in reply to kill a child / parent process
and the program testsrv.pl looked like this:cygrunsrv -I testsrv -p c:/bin/perl.exe -a /home/hirschk/testsrv.pl
#!perl -w use strict; my $quit = 0; $SIG{TERM} = sub { $quit = 1; }; open OUT, ">>/home/hirschk/srvout"; select(OUT); $|++; print OUT "start time = ", scalar(localtime(time)), "\n"; select(STDOUT); while (1) { sleep(15); if ($quit) { print OUT "quitting at ", scalar(localtime(time)), "\n"; exit(0); } print OUT "time = ", scalar(localtime(time)), "\n"; }
|
|---|