JaWi has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow monks,

I'm currently busy with a graphical front-end for smbclient, which allows me to click-and-download files from remote Samba hosts. Downloading is done simply by `back-ticking' a smbclient command.

It is possible to stop ongoing downloads by sending a HUP signal to the current process group (as stated in the PerlIPC manpage). This feature works fine until I spawn my graphical front-end from another Perl script! The kill-signal seems to be ignored and the smbclient program keeps running.

Is there a reliable way to make sure a script can kill all of his children even if the script itself is a child?

Thanks in advance!

-- JaWi

"A chicken is an egg's way of producing more eggs."

Replies are listed 'Best First'.
Re: Reliable killing children
by JaWi (Hermit) on Aug 21, 2002 at 15:01 UTC
    Fellow monks,

    I've seen the light! It also means I've to pay for my mistakes. My other question regarding the optimalization of Perl code has caused me to rewrite the above described problem. And guess what: it worked!

    I replaced the back-ticked commands with a `save exec' example as found in the PerlSec manpage and the ignored HUP problem magically disappeared...

    I love this language... *sob* ;-)

    -- JaWi

    "A chicken is an egg's way of producing more eggs."