develooper Front page | perl.perl5.porters | Postings from April 2007

[PATCH] Allow sending SIGINT to child processes on Windows *if* they are running Perl

Thread Next
From:
Jan Dubois
Date:
April 16, 2007 17:53
Subject:
[PATCH] Allow sending SIGINT to child processes on Windows *if* they are running Perl
Message ID:
01e301c7808a$ac0cca30$04265e90$@com
In Perl 5.6 it was possible to send SIGINT to child processes on
Windows. One problem was that the signal would be delivered to *all*
child processes in the same process group.

Perl 5.8 has some initial support for sending Console Control Events to
child processes by starting each of them as a new process group:

    http://public.activestate.com/cgi-bin/perlbrowse/p/14163

It seems like this code only works for SIGBREAK. Using the
CREATE_NEW_PROCESS_GROUP flag disables SIGINT signals sent by
GenerateConsoleCtrlEvent() by default (this does not seem to affect
Ctrl-C events generated by the keyboard).

The attached patch re-enables sending SIGINT to console child processes
if the child is running Perl and the system is Windows NT or later. This
doesn't sound that useful, but it is the best I could come up with.

Cheers,
-Jan


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About