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
116116 while (time(NULL) < end) ;
117117 run = 0;
118118
119− printf ("end\n"); fflush(stdout);
120−
121119 pthread_join(id1, NULL);
122120 pthread_join(id2, NULL);
123121 #if !defined(__APPLE__)
@@ -126,6 +124,8 @@ main (void) · 2 unmodified lines
126124 sem_destroy (&sem);
127125 sem_destroy (&sem_child);
128126
127+ printf ("end\n"); fflush(stdout);
128+
129129 sigemptyset (&m);
130130 sigprocmask (SIG_SETMASK, &m, NULL);
131131 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