Solved

DOS KILL

Posted on 1998-07-02
13
1,796 Views
Last Modified: 2012-06-27
In UNIX, there is the 'kill' command, is there anything in DOS that is similar to the UNIX command?
0
Comment
Question by:mrquija
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 2

Expert Comment

by:kinkajou
ID: 1251500
Use the key sequence <ctrl>+<c> and of course there is the <ctrl>+<alt>+<del> sequence to warm boot the system.
0
 
LVL 1

Author Comment

by:mrquija
ID: 1251501
I know ctrl-c and ctrl-alt-del kill a process, but I'm curious if there's a DOS command (an exe, com, batch, etc..) that kills a process similar to the UNIX 'kill' command.
0
 
LVL 2

Expert Comment

by:kinkajou
ID: 1251502
I don't know of any. DOS is not multi-tasking like UNIX. When one process is executing, no other process can execute. This is what Kill (pid) does. It is a process that tells the UNIX kernel to suspend or end execution of a process associated with (pid).

Clarification (I'm not well versed in UNIX): you are asking about the command line kill? correct? you're not referring to some sort of C language process to discontinue execution? if so, I believe you need the exit() command.
0
 
LVL 8

Expert Comment

by:jhurst
ID: 1251503
As has been said: DOS is a single threaded os.  There is no such thing as a pid that you can kill and even if there was it would do no good because being single threaded you would either be the active process and there would be nothing to kill or it would and you would not be there to kill it.

Having said all of this there are some TSRs and other things around that do simulate multi-tasking by limnking themselves to an interrupt.  These sometimes allow for other things to be killed but not a clean manner.

If there is a specific thing that you want to do you might be better asking how to do it.  But the answer to your question as it stands is NO!
0
 

Expert Comment

by:mallrat
ID: 1251504
There is simply no command in standard DOS that will accomplish what your asking.

If your talking about the run time of a C program then there are a couple of options, simple
ones anyway. You have the obvious exit(); or the spawn and excelp functions to start another process and kill the first one.
0
 
LVL 2

Expert Comment

by:kinkajou
ID: 1251505
jhurst, thanks for locking up the question with an answer that is just a rewording of my comment. Why don't you help mrquija out by finding a TSR that will allow for a process to be terminated like the way Kill does. It was in hope that someone would come up with a TSR that I didn' t lock the question in the first place.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:mrquija
ID: 1251506
kinkajou..please repost so I can award points.
0
 
LVL 8

Expert Comment

by:jhurst
ID: 1251507
.
0
 

Expert Comment

by:aj1070798
ID: 1251508
Kinkajou - you know, most of us here come because we want to help others in a pleasant environment.  You seem not to understand that as witnessed by your comment to jhurst.  Since points are so important to you I would be happy to give you some of mine.  All I would ask is that you be more respectful in the future.  By the way, I doubt that you can tell me anything useful that you, or anyone else has ever done with a point from here.


0
 
LVL 2

Expert Comment

by:kinkajou
ID: 1251509
mrquija,
I've been out of town. I'll be happy to post.
As for aj1, I choose to respect mrquija's answer space. jhurst was wrong or careless.
Kinkajou
0
 
LVL 1

Author Comment

by:mrquija
ID: 1251510
kinkajou repost
0
 
LVL 2

Accepted Solution

by:
kinkajou earned 10 total points
ID: 1251511
Thank you, mrquija. Post...
0
 
LVL 1

Author Comment

by:mrquija
ID: 1251512
Thanks for the help once again.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Change to the struct 72 191
Adjust Mfcapp 29 155
Inorder binary search tree 5 153
How to create frequencies of a variable from SAS dataset? 10 115
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now