History

Fix fork problem 114_bound_signal

There is a race condition in old libc in fork(). The result was that 'end' was sometimes printed twice. This did not happen with glibc-2.32.

herman ten brugge committed 6 years ago

Commit 08d80151 parent 54b4aa31 file · +2 −2Browse files

Unified · Split

tests/tests2/114_bound_signal.c+2−2
@@ -116,8 +116,6 @@ main (void) · 115 unmodified lines
116 while (time(NULL) < end) ;116 while (time(NULL) < end) ;
117 run = 0;117 run = 0;
118 118
119 printf ("end\n"); fflush(stdout);
120
121 pthread_join(id1, NULL);119 pthread_join(id1, NULL);
122 pthread_join(id2, NULL);120 pthread_join(id2, NULL);
123#if !defined(__APPLE__)121#if !defined(__APPLE__)
@@ -126,6 +124,8 @@ main (void) · 2 unmodified lines
126 sem_destroy (&sem);124 sem_destroy (&sem);
127 sem_destroy (&sem_child);125 sem_destroy (&sem_child);
128 126
127 printf ("end\n"); fflush(stdout);
128
129 sigemptyset (&m);129 sigemptyset (&m);
130 sigprocmask (SIG_SETMASK, &m, NULL);130 sigprocmask (SIG_SETMASK, &m, NULL);
131 if (sigsetjmp (sj, 0) == 0)131 if (sigsetjmp (sj, 0) == 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t