jsvc should no longer setpgrp() on startup
------------------------------------------
Key: DAEMON-232
URL: https://issues.apache.org/jira/browse/DAEMON-232
Project: Commons Daemon
Issue Type: Bug
Components: Jsvc
Reporter: Adar Dembo
jsvc-unix.c runs the following code in the child process before
{code}
/* create a new process group to prevent kill 0 killing the monitor process
*/
#if defined(OS_FREEBSD) || defined(OS_DARWIN)
setpgid(0, 0);
#else
setpgrp();
#endif
{code}
This puts the child in its own process group, breaking some process management
tools (such as supervisor) that expect to be able to kill a logical process by
sending a SIGKILL to its process group. The su binary, which is somewhat
analogous in function to jsvc, doesn't do this.
As best I can tell, there's no code in jsvc that does kill(0, ...). There's
also not enough svn history to provide more context. As for the child process
doing a kill(0, ...), I find it highly unlikely that the JVM itself sends
signals.
So is the setpgrp call still necessary? If not, can it be removed?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira