Another server question

Joel Coltoff coltoff at PRC.Unisys.COM
Thu Nov 24 06:28:27 AEST 1988


I have yet another question about servers. As with the last one
it comes from having to port my current implmentation to a system
V machine.

The general flow of the code looks like this. (I think it is the
typical server paradigm). Error checking let out for brevity.


	signal( SIGCLD, reaper);
	for ( ;; ){
		set up socket
		accept();
		fork(){
			application set up
			exec();
		}
		clean up file descritors
	}

This works fine under 4.3 and Sun 3.4 (even if it isn't 100% correct)

What I notice under System V is that when the last of a group of active
child servers goes away the parent server gets a SIGCLD. This situation
is easy to deal with. The question I have is why don't I get a SIGCLD
as each child server dies (gracefully exits)? This isn't what I want
but certainly makes more sense than getting one when the last child
exits.

Thanks in advance,
-- 
	- Joel
		{psuvax1,sdcrdcf}!burdvax!coltoff	(UUCP)
		coltoff at burdvax.prc.unisys.com		(ARPA)



More information about the Comp.unix.wizards mailing list