[OpenAFS-devel] [PATCH 1.3.81] use daemon() in afsd, bosserver

Christopher Allen Wing wingc@engin.umich.edu
Thu, 21 Apr 2005 17:22:17 -0400 (EDT)


afsd needs to run the AFSDB lookup handler as a background process; by
default, it just forks and doesn't drop its controlling TTY nor does it
close the file descriptors for stdin, stdout, etc.

bosserver contains some homegrown code for running in the background; this
can be replaced with daemon() as well. (As it currently stands, bosserver
doesn't close its file descriptors, but this should probably be changed
because it's undesirable for processes started at boot time to send output
randomly to the console)


This patch adds the necessary call to daemon() in afsd, and replaces the
existing background() function with daemon() in bosserver. It requires my
previous patch to provide daemon() for Unixes that don't have it.


	http://www-personal.engin.umich.edu/~wingc/openafs/patches/openafs-1.3.81-usedaemon.patch



Thanks,

Chris
wingc@engin.umich.edu