diff options
Diffstat (limited to 'man2/sigaltstack.2')
| -rw-r--r-- | man2/sigaltstack.2 | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2 index 882b2f16d9..41456e41a8 100644 --- a/man2/sigaltstack.2 +++ b/man2/sigaltstack.2 @@ -130,23 +130,6 @@ The specified size of the new alternate signal stack An attempt was made to change the alternate signal stack while it was active (i.e., the process was already executing on the current alternate signal stack). -.SH EXAMPLE -The following code segment demonstrates the use of -.BR sigaltstack (): - -.RS -.nf -stack_t ss; - -ss.ss_sp = malloc(SIGSTKSZ); -if (ss.ss_sp == NULL) - /* Handle error */; -ss.ss_size = SIGSTKSZ; -ss.ss_flags = 0; -if (sigaltstack(&ss, NULL) == \-1) - /* Handle error */; -.fi -.RE .SH "CONFORMING TO" SUSv2, SVr4, POSIX.1-2001. .SH NOTES @@ -203,6 +186,23 @@ system call. It used a slightly different struct, and had the major disadvantage that the caller had to know the direction of stack growth. +.SH EXAMPLE +The following code segment demonstrates the use of +.BR sigaltstack (): + +.RS +.nf +stack_t ss; + +ss.ss_sp = malloc(SIGSTKSZ); +if (ss.ss_sp == NULL) + /* Handle error */; +ss.ss_size = SIGSTKSZ; +ss.ss_flags = 0; +if (sigaltstack(&ss, NULL) == \-1) + /* Handle error */; +.fi +.RE .SH "SEE ALSO" .BR execve (2), .BR setrlimit (2), |
