assigning a process id
I want to start a process, and assign it a pid myself, so that later on I can kill it. How can I do that, and how can I take care that the pid is not already being used by another process?
|
you can't. most functions in most languages will, when executing an external process, return the external pid for your use later. the principle of being able to pick your own pid's doesn't make sense, and is pretty nonsensical.. no offense ;-)
|
Then, can u tell me how can I recover the pid of the process i've just started. I have to do all this within a program, so I can't just do 'ps' and look for the pid.
|
http://www.delorie.com/gnu/docs/glibc/libc_566.html
is that what you need? http://www.delorie.com/gnu/docs/glibc/libc_563.html or that? (the first one comes from the second one, just for small note) |
yeah, i think u've solved my problem. Thanks:D
|
All times are GMT -5. The time now is 06:16 PM. |