Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94080
b: refs/heads/master
c: 4415d8a
h: refs/heads/master
v: v3
  • Loading branch information
WANG Cong authored and Linus Torvalds committed Apr 28, 2008
1 parent 1cfee4f commit ee963b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 074a0db8e17ae271736148809c5f9d47dec2d993
refs/heads/master: 4415d8a5aaec2008833e1c474b38627c0bc738ca
12 changes: 8 additions & 4 deletions trunk/arch/um/os-Linux/sys-i386/task_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ unsigned long os_get_task_size(void)
sa.sa_handler = segfault;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_NODEFER;
sigaction(SIGSEGV, &sa, &old);
if (sigaction(SIGSEGV, &sa, &old)) {
perror("os_get_task_size");
exit(1);
}

if (!page_ok(bottom)) {
fprintf(stderr, "Address 0x%x no good?\n",
Expand All @@ -110,11 +113,12 @@ unsigned long os_get_task_size(void)

out:
/* Restore the old SIGSEGV handling */
sigaction(SIGSEGV, &old, NULL);

if (sigaction(SIGSEGV, &old, NULL)) {
perror("os_get_task_size");
exit(1);
}
top <<= UM_KERN_PAGE_SHIFT;
printf("0x%x\n", top);
fflush(stdout);

return top;
}

0 comments on commit ee963b2

Please sign in to comment.