aboutsummaryrefslogtreecommitdiffstats
path: root/man2/sigaltstack.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sigaltstack.2')
-rw-r--r--man2/sigaltstack.211
1 files changed, 8 insertions, 3 deletions
diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2
index f1506cfba0..189db1b3ae 100644
--- a/man2/sigaltstack.2
+++ b/man2/sigaltstack.2
@@ -295,12 +295,17 @@ The following code segment demonstrates the use of
stack_t ss;
ss.ss_sp = malloc(SIGSTKSZ);
-if (ss.ss_sp == NULL)
- /* Handle error */;
+if (ss.ss_sp == NULL) {
+ perror("malloc");
+ exit(EXIT_FAILURE);
+}
+
ss.ss_size = SIGSTKSZ;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) == \-1)
- /* Handle error */;
+ perror("sigaltstack");
+ exit(EXIT_FAILURE);
+}
.EE
.in
.SH BUGS