Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-232

jsvc should no longer setpgrp() on startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.9
    • Jsvc
    • None

    Description

      jsvc-unix.c runs the following code in the child process before

          /* 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
      

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            adar Adar Dembo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: