Annotation of 43BSDReno/lib/libc/sys/sigreturn.2, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1985 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"    @(#)sigreturn.2 6.4 (Berkeley) 6/23/90
                     19: .\"
                     20: .TH SIGRETURN 2 "June 23, 1990"
                     21: .UC 6
                     22: .SH NAME
                     23: sigreturn \- return from signal
                     24: .SH SYNOPSIS
                     25: .nf
                     26: .B #include <signal.h>
                     27: .PP
                     28: .B struct      sigcontext {
                     29: .B     int     sc_onstack;
                     30: .B     int     sc_mask;
                     31: .B     int     sc_sp;
                     32: .B     int     sc_fp;
                     33: .B     int     sc_ap;
                     34: .B     int     sc_pc;
                     35: .B     int     sc_ps;
                     36: .B };
                     37: .PP
                     38: .B sigreturn(scp);
                     39: .B struct sigcontext *scp;
                     40: .SH DESCRIPTION
                     41: .I Sigreturn
                     42: allows users to atomically unmask, switch stacks,
                     43: and return from a signal context.
                     44: The processes signal mask and stack status are
                     45: restored from the context.
                     46: The system call does not return;
                     47: the users stack pointer, frame pointer, argument pointer,
                     48: and processor status longword are restored from the context.
                     49: Execution resumes at the specified pc.
                     50: This system call is used by the trampoline code, and
                     51: .IR longjmp (3)
                     52: when returning from a signal to the previously executing program.
                     53: .SH NOTES
                     54: This system call is not available in 4.2BSD,
                     55: hence it should not be used if backward compatibility is needed.
                     56: .SH "RETURN VALUE
                     57: If successful, the system call does not return.
                     58: Otherwise, a value of \-1 is returned and 
                     59: .I errno
                     60: is set to indicate the error.
                     61: .SH ERRORS
                     62: .I Sigreturn
                     63: will fail and the process context will remain unchanged
                     64: if one of the following occurs.
                     65: .TP 15
                     66: [EFAULT]
                     67: .I Scp
                     68: points to memory that is not a valid part of the process
                     69: address space.
                     70: .TP
                     71: [EINVAL]
                     72: The process status longword is invalid or would improperly
                     73: raise the privilege level of the process.
                     74: .SH "SEE ALSO"
                     75: sigvec(2), setjmp(3)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.