[Haiku-bugs] [Haiku] #2773: Wrong SIG returned
scottmc
trac at haiku-os.org
Thu Sep 25 20:15:18 CEST 2008
#2773: Wrong SIG returned
-----------------------+----------------------------------------------------
Reporter: scottmc | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: - General | Version: R1 development
Blockedby: | Platform: All
Blocking: |
-----------------------+----------------------------------------------------
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 at hythloth:~$ ./a.out
sig 11
hoffman at 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.
--
Ticket URL: <http://dev.haiku-os.org/ticket/2773>
Haiku <http://dev.haiku-os.org>
The Haiku operating system.
More information about the Haiku-bugs
mailing list