Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SIGRETURN(2)		  FreeBSD System Calls Manual		  SIGRETURN(2)

NAME
     sigreturn -- return from signal

SYNOPSIS
     int
     sigreturn(struct sigcontext *scp);

DESCRIPTION
     The sigreturn() syscall is	used by	the signal handling facility to	atomi-
     cally switch stacks, restore registers and	the thread's signal mask, and
     return from a signal context to resume the	processing that	was inter-
     rupted by the signal.

     Note that sigcontext contains machine dependent information.

     Direct use	of sigreturn is	no longer supported and	it is not provided as
     a function.  As used in the signal	trampoline provided by the system, if
     sigreturn fails and returns then the process is terminated.

RETURN VALUES
     If	successful, the	system call does not return.  Otherwise, a value of -1
     is	returned and errno is set to indicate the error.

ERRORS
     sigreturn() will fail and the process context will	remain unchanged if
     one of the	following occurs.

     [EFAULT]		scp points to memory that is not a valid part of the
			process	address	space.

     [EINVAL]		The sigcontext provided	is invalid or would improperly
			raise the privilege level of the process.

SEE ALSO
     sigaction(2), setjmp(3)

HISTORY
     The sigreturn() function appeared in 4.3BSD.  The function	was removed
     from libc in OpenBSD 6.0.

FreeBSD	13.0			  May 9, 2016			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=sigreturn&sektion=2&manpath=OpenBSD+6.9>

home | help