system call is unmount not umount
[unix-history] / usr / src / lib / libc / sys / sigstack.2
CommitLineData
88b3ccf2
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
39861f6c 3.\"
88b3ccf2
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)sigstack.2 6.3 (Berkeley) %G%
39861f6c 17.\"
3a2b5451 18.TH SIGSTACK 2 ""
39861f6c
KM
19.UC 5
20.SH NAME
21sigstack \- set and/or get signal stack context
22.SH SYNOPSIS
23.nf
24.B #include <signal.h>
25.PP
26.B struct sigstack {
27.B caddr_t ss_sp;
28.B int ss_onstack;
29.B };
30.PP
31.B sigstack(ss, oss);
32.B struct sigstack *ss, *oss;
33.SH DESCRIPTION
34.I Sigstack
35allows users to define an alternate stack on which signals
36are to be processed. If
37.I ss
38is non-zero,
39it specifies a
40.I "signal stack"
41on which to deliver signals
42and tells the system if the process is currently executing
43on that stack. When a signal's action indicates its handler
44should execute on the signal stack (specified with a
45.IR sigvec (2)
46call), the system checks to see
47if the process is currently executing on that stack. If the
48process is not currently executing on the signal stack,
49the system arranges a switch to the signal stack for the
50duration of the signal handler's execution.
51If
52.I oss
53is non-zero, the current signal stack state is returned.
54.SH NOTES
55Signal stacks are not ``grown'' automatically, as is
56done for the normal stack. If the stack overflows
57unpredictable results may occur.
58.SH "RETURN VALUE
59Upon successful completion, a value of 0 is returned.
60Otherwise, a value of \-1 is returned and
61.I errno
62is set to indicate the error.
63.SH ERRORS
64.I Sigstack
65will fail and the signal stack context will remain unchanged
66if one of the following occurs.
67.TP 15
68[EFAULT]
69Either
70.I ss
71or
72.I oss
eff6446c 73points to memory that is not a valid part of the process
39861f6c
KM
74address space.
75.SH "SEE ALSO"
76sigvec(2), setjmp(3)