Re: [PATCH] daemonize & change user fixes

Kalle Marjola <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Enpocket
Message-ID <[email protected]>
On Tue, 2004-11-02 at 02:48, Alexander Malysh wrote:
> Hi,
> 
> attached patch fixes daemonize mode (make sure stdin/stdout/sdterr are
> opened and do chdir("/")) and change user code (set supplementary group
> id's and don't destroy passwd struct).
> 
+1 for all except that '/' -thing:
-----
     /* XXX chdir breaks restart of boxes when
        started w/o a full path to binary */
-    /* chdir("/"); */
+    chdir("/");
-----
Seems like there was reason not to do it. I do not say that
this isn't right thing to do, but then if parachute is used,
then Kannel should make sure that the path is full, not
relative - can it like test, in daemon mode, that it can find
itself before starting up?

> This patch should go into 1.4.0 stable.

Yes except notes above.

-- 
 &Kalle Marjola ::: Development ::: Helsinki ::: Enpocket
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.