Here is my sample perl program.
The PID returns the pseudo process ID ( which is a negative number). When kill command sends 9 signal to the pseudo process ID, ( I assume the exec process ID falls under pseudo process ID) the exec process won't get killed.
Any help on how to kill the exec process on windows? I'm running this program on Windows XP.
Thanks In Advance
Hansini
Last edited by Franklin52; 09-02-2011 at 10:51 AM..
Reason: Please use code tags for code and data samples, thank you
fork() is creating a new thread within the same process and returning that pseudo-process id. When you exec() from within that pseudo-process' thread, an actual new process with a different pid is created to run the exec()'d executable. The kill() is affecting the pseudo-process thread in the current process, not the separate process created by the exec().
I understand that fork create a child but I need very simple example that make child useful....
I mean how will make the program faster anyone explain with code plz
using C plz (2 Replies)
I'm trying to run a simple test on how to use fork(), i'm able to execute the child process first then the parent, but how can I execute parent then child..?
Thanks! (1 Reply)
Hi,
I wrote a simple program for understanding the fork command. The code is as below
int main(void)
{
fork(); printf("hi 1 \n");
fork(); printf("hi 2 \n");
fork(); printf("hi 3 \n");
}
I am getting a variation in the number of times the printf is called if i remove the \n from each... (2 Replies)
Hello all.
I'm developing a filetransfer application, which is supposed to work sort of like dcc, with multiple transfers etc. Now i wonder what the best way to manage the transfers is. Should i fork() for each new transfer, hogging loads of memory or use pthreads? Maybe I can use select to see... (0 Replies)
Hello,
I need to make a gateway from Ethernet to RS-485. I am using stream socket, and I am programming in windows nt. I would like to know how could I use some functions from unix in windows nt. I would like to use the function fork(). Which library it uses and how can I get it? Can I... (1 Reply)