Opened 16 years ago
Closed 16 years ago
#2773 closed bug (fixed)
Wrong SIG returned
Reported by: | scottmc | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
When building CMake we ran into some failed test cases. One of them was test processes. Here's a sample program that shows a difference between Haiku and Linux, that Bill Hoffman wrote up:
#include <unistd.h> #include <errno.h> #include <stdio.h> #include <sys/wait.h> int main() { int status; pid_t pid = fork(); if(pid == 0) { *(int*)0 = 0; return 1; } while((waitpid(pid, &status, 0) < 0) && (errno == EINTR)); if(WIFEXITED(status)) { fprintf(stderr, "exited %d\n", (int)WEXITSTATUS(status)); } else if(WIFSIGNALED(status) ) { fprintf(stderr, "sig %d\n", (int)WTERMSIG(status)); } return 0; } hoffman@hythloth:~$ ./a.out sig 11 hoffman@hythloth:~$ That was on a linux box. On Haiku it prints sig 9.
Adjust the summary as needed as I didn't know what to call this one.
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | beos-also-sig-11.png added |
---|
comment:1 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I didn't think anyone would care, so ATM we send a SIGKILL when a segment violation occurs and there's no SIGSEGV handler. Will change that later.
Note:
See TracTickets
for help on using tickets.
BeOS also shows sig 11 like linux