diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-06 21:27:04 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-06 21:27:04 +0200 |
commit | 4a71b30364a4b6d1eaf16fcfdc8e873e6697f293 (patch) | |
tree | a47014077c14579249859ad34afcc5a8f2f0730a /nsprpub/pr/tests/forktest.c | |
parent | d7da72799521386c110dbba73b1e483b00a0a56a (diff) | |
parent | 2dad0ec41d0b69c0a815012e6ea4bdde81b2875b (diff) | |
download | UXP-4a71b30364a4b6d1eaf16fcfdc8e873e6697f293.tar UXP-4a71b30364a4b6d1eaf16fcfdc8e873e6697f293.tar.gz UXP-4a71b30364a4b6d1eaf16fcfdc8e873e6697f293.tar.lz UXP-4a71b30364a4b6d1eaf16fcfdc8e873e6697f293.tar.xz UXP-4a71b30364a4b6d1eaf16fcfdc8e873e6697f293.zip |
Merge branch 'NSS-335'
Diffstat (limited to 'nsprpub/pr/tests/forktest.c')
-rw-r--r-- | nsprpub/pr/tests/forktest.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/nsprpub/pr/tests/forktest.c b/nsprpub/pr/tests/forktest.c index a389fa479..66dc64575 100644 --- a/nsprpub/pr/tests/forktest.c +++ b/nsprpub/pr/tests/forktest.c @@ -196,51 +196,6 @@ finish: return; } -#ifdef _PR_DCETHREADS - -#include <syscall.h> - -pid_t PR_UnixFork1(void) -{ - pid_t parent = getpid(); - int rv = syscall(SYS_fork); - - if (rv == -1) { - return (pid_t) -1; - } else { - /* For each process, rv is the pid of the other process */ - if (rv == parent) { - /* the child */ - return 0; - } else { - /* the parent */ - return rv; - } - } -} - -#elif defined(SOLARIS) - -/* - * It seems like that in Solaris 2.4 one must call fork1() if the - * the child process is going to use thread functions. Solaris 2.5 - * doesn't have this problem. Calling fork() also works. - */ - -pid_t PR_UnixFork1(void) -{ - return fork1(); -} - -#else - -pid_t PR_UnixFork1(void) -{ - return fork(); -} - -#endif /* PR_DCETHREADS */ - int main(int argc, char **argv) { pid_t pid; @@ -250,7 +205,7 @@ int main(int argc, char **argv) DoIO(); - pid = PR_UnixFork1(); + pid = fork(); if (pid == (pid_t) -1) { fprintf(stderr, "Fork failed: errno %d\n", errno); |