[gpm] Question about commit e8ea3d3...

Mike Frysinger vapier@gentoo.org
Sun Apr 20 11:13:41 CEST 2008


On Sunday 20 April 2008, Nico Schottelius wrote:
> Regarding the daemon() commit: It looks for me that daemon is Linux
> specific (as in: non-posix) [0]. As my aim for gpm2 is to run on all
> posix plattform

sorry, you're right of course.  i forgot that gpm was targetting POSIX and not 
Linux.

> So my proposal is to revoke that commit and add close of STDIN_FILENO,
> ... and connect those three fds to /dev/null as described in daemon(3).

hrm, i think using daemon() when possible would still be better.  perhaps a 
configure test to see if the function is available ?

otherwise, the code to use would be what glibc does ... open /dev/null and use 
dup() to connect STD{IN,OUT,ERR}_FILENO to that fd ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.linux.it/pipermail/gpm/attachments/20080420/2d0b2175/attachment.pgp 


More information about the gpm mailing list