[Pkg-dspam-misc] patch to background dspam
Matthijs Mohlmann
matthijs at cacholong.nl
Thu Dec 29 10:40:49 UTC 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
What do you think about a patch to fork dspam into the background ? If I
enable dspam in daemon mode then the next update the package won't get
installed without hitting Ctrl-C. The manpage of start-stop-daemon says
this about --background:
- -b|--background
Typically used with programs that don?t detach on their own.
This option will force start-stop-daemon to fork before starting
the process, and force it into the background. WARNING:
start-stop-daemon cannot check the exit status if the process
fails to execute for any reason. This is a last resort, and is
only meant for programs that either make no sense forking on
their own, or where it?s not feasible to add the code for it to
do this itself.
Well, a simple:
if (fork()) {
exit(0);
}
will work.
Regards,
Matthijs Mohlmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDs70x2n1ROIkXqbARAsnOAJ4yCYVvlgzZvh6DZAUJWi8GQt0m9gCfetAX
eIZmkPPrKMQ7rPsd4/ziZZ0=
=gYCa
-----END PGP SIGNATURE-----
More information about the Pkg-dspam-misc
mailing list