unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



sigreturn(2)							 sigreturn(2)



NAME
  sigreturn - Returns from signal

SYNOPSIS

  #include <signal.h>
  int sigreturn(
	  struct sigcontext *scp) ;

PARAMETERS

  scp	    Points to a	sigcontext structure whose members contain the pro-
	    cessor state to be restored. The contents of the sigcontext
	    structure should have been previously obtained by entry to a sig-
	    nal	handler	or by the setjmp() or sigsetjmp() function.

DESCRIPTION
  The sigreturn() function restores the	processor state	of the calling pro-
  cess from a sigcontext structure. The	sigcontext structure contains the
  state	of all application-visible registers as	well as	the signal mask. The
  specific members of the sigcontext structure depend on the machine archi-
  tecture. Each	machine-dependent structure member is defined in the signal.h
  include file.

  The sigreturn() function is used internally by the system software to
  restore the processor	state on return	from a signal handler and from a
  longjmp() function, to restore the state saved by a previous setjmp()	or
  sigsetjmp() function.

NOTES
  An application should	only use sigreturn() with great	caution.

RETURN VALUES
  Upon successful completion, the sigreturn() function does not	return.	 Oth-
  erwise, a value of -1	is returned and	errno may be set to indicate the
  error.

ERRORS
  If the sigreturn() function fails, the process context remains unchanged
  and errno is set to one of the following values:

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

  [EINVAL]  The	sigcontext structure contains unsupported or illegal values.

RELATED	INFORMATION

  Functions: setjmp(3),	sigaction(2), sigvec(2)