sys/emulation/43bsd/43bsd_signal.c
int
sys_osigvec(struct osigvec_args *uap)
{
	struct sigvec vec;
	struct sigaction nsa, osa;
	struct sigaction *nsap, *osap;
	int error;

	if (uap->signum <= 0 || uap->signum >= ONSIG)
		return (EINVAL);
	nsap = (uap->nsv != NULL) ? &nsa : NULL;
	osap = (uap->osv != NULL) ? &osa : NULL;
	if (nsap) {
		error = copyin(uap->nsv, &vec, sizeof(vec));
		if (error)
			return (error);
		nsap->sa_handler = vec.sv_handler;
		OSIG2SIG(vec.sv_mask, nsap->sa_mask);
		nsap->sa_flags = vec.sv_flags;
		nsap->sa_flags ^= SA_RESTART;	/* opposite of SV_INTERRUPT */
	}

	error = kern_sigaction(uap->signum, nsap, osap);

	if (osap && !error) {
		vec.sv_handler = osap->sa_handler;
		SIG2OSIG(osap->sa_mask, vec.sv_mask);
		vec.sv_flags = osap->sa_flags;
		vec.sv_flags &= ~SA_NOCLDWAIT;
		vec.sv_flags ^= SA_RESTART;
		error = copyout(&vec, uap->osv, sizeof(vec));
	}
	return (error);
}
/*
 * These syscalls are unncessary because it is next to impossible to
 * find 4.3BSD binaries built for i386.  The current libc has routines
 * which fake the 4.3BSD family of signal syscalls, so anything built
 * from source won't be using these.
 *
 * This file is provided for educational purposes only.  The osigvec()
 * syscall is probably broken because the current signal code uses
 * a different signal trampoline.
 *
 * MPALMOSTSAFE
 */
These syscalls are unncessary because it is next to impossible to
find 4.3BSD binaries built for i386.  The current libc has routines
which fake the 4.3BSD family of signal syscalls, so anything built
from source won't be using these.

This file is provided for educational purposes only.  The osigvec()
syscall is probably broken because the current signal code uses
a different signal trampoline.

MPALMOSTSAFE
These syscalls are unncessary because it is next to impossible to find 4 . 3BSD binaries built for i386 . The current libc has routines which fake the 4 . 3BSD family of signal syscalls so anything built from source won ' t be using these . This file is provided for educational purposes only . The osigvec () syscall is probably broken because the current signal code uses a different signal trampoline . MPALMOSTSAFE
int
sys_osigvec(struct osigvec_args *uap)
{
	struct sigvec vec;
	struct sigaction nsa, osa;
	struct sigaction *nsap, *osap;
	int error;
	if (uap->signum <= 0 || uap->signum >= ONSIG)
		return (EINVAL);
	nsap = (uap->nsv != NULL) ? &nsa : NULL;
	osap = (uap->osv != NULL) ? &osa : NULL;
	if (nsap) {
		error = copyin(uap->nsv, &vec, sizeof(vec));
		if (error)
			return (error);
		nsap->sa_handler = vec.sv_handler;
		OSIG2SIG(vec.sv_mask, nsap->sa_mask);
		nsap->sa_flags = vec.sv_flags;
		nsap->sa_flags ^= SA_RESTART;	
	}
	error = kern_sigaction(uap->signum, nsap, osap);
	if (osap && !error) {
		vec.sv_handler = osap->sa_handler;
		SIG2OSIG(osap->sa_mask, vec.sv_mask);
		vec.sv_flags = osap->sa_flags;
		vec.sv_flags &= ~SA_NOCLDWAIT;
		vec.sv_flags ^= SA_RESTART;
		error = copyout(&vec, uap->osv, sizeof(vec));
	}
	return (error);
}
int sys_osigvec ( struct osigvec_args * uap ) { struct sigvec vec ; struct sigaction nsa , osa ; struct sigaction * nsap , * osap ; int error ; if ( uap -> signum <= 0 || uap -> signum >= ONSIG ) return ( EINVAL ) ; nsap = ( uap -> nsv != NULL ) ? & nsa : NULL ; osap = ( uap -> osv != NULL ) ? & osa : NULL ; if ( nsap ) { error = copyin ( uap -> nsv , & vec , sizeof ( vec ) ) ; if ( error ) return ( error ) ; nsap -> sa_handler = vec . sv_handler ; OSIG2SIG ( vec . sv_mask , nsap -> sa_mask ) ; nsap -> sa_flags = vec . sv_flags ; nsap -> sa_flags ^= SA_RESTART ; } error = kern_sigaction ( uap -> signum , nsap , osap ) ; if ( osap && ! error ) { vec . sv_handler = osap -> sa_handler ; SIG2OSIG ( osap -> sa_mask , vec . sv_mask ) ; vec . sv_flags = osap -> sa_flags ; vec . sv_flags &= ~ SA_NOCLDWAIT ; vec . sv_flags ^= SA_RESTART ; error = copyout ( & vec , uap -> osv , sizeof ( vec ) ) ; } return ( error ) ; }
These syscalls are unncessary because it is next to impossible to
 find 4.3BSD binaries built for i386.
These syscalls are unncessary because it is next to impossible to find 4 . 3BSD binaries built for i386 .
/* opposite of SV_INTERRUPT */