Process group ownership
Jos Backus
josb at cncdsl.com
Thu Dec 27 18:06:03 GMT 2001
source/smbd/server.c has:
/****************************************************************************
Send a SIGTERM to our process group.
*****************************************************************************/
static void killkids(void)
{
if(am_parent) kill(0,SIGTERM);
}
I think this is a bad coding practice: we did not create the pgrp so we should
not be killing processes in it because other processes may be part of it. Iow
if we don't ``own'' the pgrp we should not be messing with it.
There are two ways to fix this:
- keep track of our children and kill them explicitly;
- create our own process group (using setpgrp()/setsid()).
Thoughts? Please Cc me because I am not on this list.
--
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
josb at cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;
More information about the samba-technical
mailing list