What is sigcleanup?

Chris Torek torek at elf.ee.lbl.gov
Mon Feb 18 21:08:58 AEST 1991


>In article <1991Jan22.153802.9869 at daimi.aau.dk> kaja at daimi.aau.dk
>(Kaja P. Christiansen) writes:
>>What is "sigcleanup" doing?

In article <119782 at uunet.UU.NET> rbj at uunet.UU.NET (Root Boy Jim) writes:
>I dunno for sure, but I'll hazard a guess. It could be a mutation of
>4.3BSD's sigreturn call with new bells and whistles. ...

This is almost exactly backwards.

4.2BSD had an undocumented almost-but-not-quite-system-call (#139)
called (internally) sigcleanup().  The reason I call it an `almost-
but-not-quite-system-call' is the following, found near the top of
/sys/vax/trap.c's syscall() function in 4.2BSD:

	u.u_ar0 = locr0;
	if (code == 139) {			/* XXX */
		sigcleanup();			/* XXX */
		goto done;			/* XXX */
	}
	params = (caddr_t)locr0[AP] + NBPW;

The code at `done' handled the case where a regular system call was
all done and needed to return, having already changed r0 (and possibly
r1) and set the PSL condition codes.  Naturally, returning from a
signal should not set r0 or the PSL to `successful return from signal'
since the signal may have occurred while r0 or the condition codes
were in use for something else.

sigcleanup has since been replaced with sigreturn, which rbj has
already described.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.unix.wizards mailing list