You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jos Backus <jo...@cncdsl.com> on 2001/11/21 08:07:55 UTC

HAVE_SETSID problem

I am trying to modify Apache 2.0.28 to put itself into its own pgrp even when
using NO_DETACH, and am seeing something strange. include/ap_config_auto.h
uses HAVE_SETSID, but srclib/apr/threadproc/unix/procsup.c checks for
APR_HAVE_SETSID. So on FreeBSD, even though HAVE_SETSID is set, the code in
procsup.c uses setpgid() instead of setsid(), which seems wrong to me. Also,
in the code that does get used, pgrp gets set to 0, which doesn't make much
sense to me (but maybe I misunderstand how setpgid() works).

    if ((pgrp = setpgid(0, 0)) == -1) {
        return errno;
    }

Ideas, anyone?

Thanks,
-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb@cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;