Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 1997 13:33:34 -0500
From:      "Matthew A. Gessner" <mgessner@aristar.com>
To:        hackers <hackers@freebsd.org>
Subject:   Writing a daemon...
Message-ID:  <3313307E.41C67EA6@aristar.com>

next in thread | raw e-mail | index | archive | help
Hello, hackers,

	I'm looking for some really good information on writing a daemon for a)
FreeBSD and b) DEC ALPHA OSF/1.  I've got Stevens'
_Unix_Network_Programming_, and have read that, but in the past have had
some problems getting the code to compile properly under FreeBSD.  I
just want to make sure that nothing's really 'changed' in the 'art' of
daemon writing since his book was published.

	If anyone can add any tips or recommendations (specifically, if anyone
has a good source for OSF), please let me know.

	Maybe you're wondering why I'm doing this?  I'll explain quickly. 
Stevens has a socket server example in his book.  It runs fine on
FreeBSD, but under OSF, when the first client disconnects, accept()
keeps returning a new socket for the old IP address.  In
/usr/examples/network_programming, I found a file called socketserver.c.

	The only, ONLY, _O_N_L_Y_ difference in calls is that when the child
terminates, it calls return(0) instead of exit(0).  Don't you know, that
made ALL the difference.  Why?  "Don't know; can't tell ya."

	So I'm a little bit suspicious.

	Thanks, folks,

		Matt
--
Matthew Gessner, Computer Scientist, <mgessner@aristar.com>
Aristar, Inc.
302 N. Cleveland-Massillon Rd.
Akron, OH 44333
Voice (330) 668-2267, Fax (330) 668-2961



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3313307E.41C67EA6>