in reply to wierd wierd behavior with SIGTERM and classes

It sure does sound like the signal is getting sent to the entire process group (for whatever strange reason). If you just need a work around and the children don't need to be in the same process group, just have the child move itself into a new process group with setpgrp or see POSIX for setpgid or setsid (a man page on your system is probably a better description though). They are not very portable, but I think all of them are implemented on Solaris.

bluto

  • Comment on Re: wierd wierd behavior with SIGTERM and classes

Replies are listed 'Best First'.
Re: Re: wierd wierd behavior with SIGTERM and classes
by shrubbery (Acolyte) on Mar 01, 2002 at 16:46 UTC
    The thing is.. there aren't really any children involved. I'm starting each script up on the command line so each one is already in its own process group. And apparently, setsid() only works if your not a process leader.

    Another thing I just found was, killing the first instance of the script doesn't do anything but stop the first script. Killing the 2nd or 3rd kills all 3 but killing the first only kills that instance.

    This is just getting odder and odder.

      This is strange. Do you have more specifics? Such as the OS, the OS version, which shell, which version of Perl, and a sample of what the command line looks like starting these? If you also had a case where it fails like this along with the PID, PPID, SID, etc. of each one it would help.