[ 
https://issues.apache.org/jira/browse/DAEMON-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mladen Turk resolved DAEMON-232.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.9

Removed the code.
You are right. We don't call kill(0) neither does JVM
                
> 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
>             Fix For: 1.0.9
>
>
> 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

        

Reply via email to