develooper Front page | perl.beginners | Postings from March 2002

child processes not responding to HUP signal when parent running in BG

From:
news reader
Date:
March 21, 2002 13:51
Subject:
child processes not responding to HUP signal when parent running in BG
Message ID:
20020321191755.23868.qmail@onion.perl.org
Hi,

I have a script working as TCP socket server.

It is forking child processes. These child processes are using system
commands also.
As some point of time, I need to kill all the processes running under main
processes.

and I am using following piece of code for that Which means to Hang up all
sub processes.

        {
        local $SIG{HUP} = 'IGNORE';
        $cnt= kill HUP => -$$;
        print "$cnt returned by kill\n";
        }


It works find till the server is running in foreground. But The server is
running in the background, it stops responding to these interrupts. and I
have to run the server in the background according to the requirement,

Please help with some solution,

Thanks,

Pratibha.






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