lib/bcheck.c: - Use INIT_SEM for child process fork on macos tests/tests2/Makefile: - tcc -run does not work for fork due to SHARED mmap
Unified · Split
| @@ -1376,7 +1376,10 @@ pid_t fork(void) · 1375 unmodified lines | |||
| 1376 | 1376 | ||
| 1377 | WAIT_SEM(); | 1377 | WAIT_SEM(); |
| 1378 | retval = (*fork_redir)(); | 1378 | retval = (*fork_redir)(); |
| 1379 | POST_SEM(); | 1379 | if (retval == 0) |
| 1380 | INIT_SEM(); | ||
| 1381 | else | ||
| 1382 | POST_SEM(); | ||
| 1380 | return retval; | 1383 | return retval; |
| 1381 | } | 1384 | } |
| 1382 | #endif | 1385 | #endif |
| @@ -94,6 +94,7 @@ GEN-ALWAYS = · 93 unmodified lines | |||
| 94 | ./a.exe | 94 | ./a.exe |
| 95 | 95 | ||
| 96 | 114_bound_signal.test: FLAGS += -b | 96 | 114_bound_signal.test: FLAGS += -b |
| 97 | 114_bound_signal.test: NORUN = true # tcc -run does not support fork and -b and SELINUX | ||
| 97 | 115_bound_setjmp.test: FLAGS += -b | 98 | 115_bound_setjmp.test: FLAGS += -b |
| 98 | 116_bound_setjmp2.test: FLAGS += -b | 99 | 116_bound_setjmp2.test: FLAGS += -b |
| 99 | 117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 ) | 100 | 117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 ) |