aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r--arch/um/os-Linux/sys-i386/task_size.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/um/os-Linux/sys-i386/task_size.c b/arch/um/os-Linux/sys-i386/task_size.c
index 48d211b3d9a1..ccb49b0aff59 100644
--- a/arch/um/os-Linux/sys-i386/task_size.c
+++ b/arch/um/os-Linux/sys-i386/task_size.c
@@ -88,7 +88,10 @@ unsigned long os_get_task_size(void)
88 sa.sa_handler = segfault; 88 sa.sa_handler = segfault;
89 sigemptyset(&sa.sa_mask); 89 sigemptyset(&sa.sa_mask);
90 sa.sa_flags = SA_NODEFER; 90 sa.sa_flags = SA_NODEFER;
91 sigaction(SIGSEGV, &sa, &old); 91 if (sigaction(SIGSEGV, &sa, &old)) {
92 perror("os_get_task_size");
93 exit(1);
94 }
92 95
93 if (!page_ok(bottom)) { 96 if (!page_ok(bottom)) {
94 fprintf(stderr, "Address 0x%x no good?\n", 97 fprintf(stderr, "Address 0x%x no good?\n",
@@ -110,11 +113,12 @@ unsigned long os_get_task_size(void)
110 113
111out: 114out:
112 /* Restore the old SIGSEGV handling */ 115 /* Restore the old SIGSEGV handling */
113 sigaction(SIGSEGV, &old, NULL); 116 if (sigaction(SIGSEGV, &old, NULL)) {
114 117 perror("os_get_task_size");
118 exit(1);
119 }
115 top <<= UM_KERN_PAGE_SHIFT; 120 top <<= UM_KERN_PAGE_SHIFT;
116 printf("0x%x\n", top); 121 printf("0x%x\n", top);
117 fflush(stdout);
118 122
119 return top; 123 return top;
120} 124}