httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jos Backus <j...@cncdsl.com>
Subject HAVE_SETSID problem
Date Wed, 21 Nov 2001 07:07:55 GMT
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;

Mime
View raw message