Arvinn Løkkebakken wrote: > Michael Brennen wrote: >> On Monday 03 December 2007, Arvinn Løkkebakken wrote: >> >> >>> I have set DAEMON=1 in the config. >>> I have some troubles with running policyd as a daemon though. Every time >>> after starting policyd in a ssh terminal I am not able to end the ssh >>> terminal when logging out afterwards. The ssh terminal lives forever >>> until I kill the policyd process that was started from within it, or >>> until I kill the sshd process itself. >> >> I've not looked at the code, but this may happen if the forked policyd is >> not >> closing one or more of stdin, stdout or stderr > > Is there a way I'll be able to verify whether this is the case?
Please try this patch: --- sockets.c 2007-12-04 08:01:07.000000000 +0200 +++ sockets.c 2007-12-04 08:01:23.000000000 +0200 @@ -455,16 +455,16 @@ if(nochdir) chdir("/"); /* change working directory */ - /* close off all file descriptors */ - if(noclose) - for(i=0;i<64;i++) - close(i); - /* redirect stdin, stdout and stderr to /dev/null */ open("/dev/null", O_RDONLY); open("/dev/null", O_RDWR); open("/dev/null", O_RDWR); + /* close off all file descriptors */ + if(noclose) + for(i=0;i<64;i++) + close(i); + return (0); } ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ policyd-users mailing list policyd-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/policyd-users