Re: fork emulation / kill

[email protected] (David Golden)
Newsgroups perl.win32.vanilla
Message-ID <[email protected]>
On Tue, Aug 24, 2010 at 11:41 AM, Alexandr Ciornii <[email protected]> wrote:
> Is it possible to kill a thread that was created by fork()? signal to
> pid of thread results in termination of whole program
>
> kill( 2, $pid ); #$pid - pid of forked thread
> Whole program dies with:
> Terminating on signal SIGINT(2)

I think that might be special treatment of SIGINT.  Have you tried it
with SIGTERM?

If I remember correctly, Control-C is emulated on Win32 in a way that
passes the signal to the console, which passes it to all processes on
the console.  (This is exactly what happens if you hit Control-C on
the keyboard.)  If your parent ignores SIGINT, then you should be able
to kill the child with it.

-- David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.