Arm has a problem with tls after a fork. The pthread_key_create seems to be forgotten? Apple has a problem with the exit(0) code in do_fork(). An IO mutex is still held after a fork().
Unified · Split
| @@ -107,7 +107,9 @@ main (void) · 106 unmodified lines | ||
| 107 | 107 | sem_init (&sem_child, 0, 0); |
| 108 | 108 | pthread_create(&id1, NULL, high_load, NULL); |
| 109 | 109 | pthread_create(&id2, NULL, do_signal, NULL); |
| 110 | +#if !defined(__arm__) && !defined(__APPLE__) | |
| 110 | 111 | pthread_create(&id3, NULL, do_fork, NULL); |
| 112 | +#endif | |
| 111 | 113 | |
| 112 | 114 | /* sleep does not work !!! */ |
| 113 | 115 | end = time(NULL) + 2; |
| @@ -118,7 +120,9 @@ main (void) · 4 unmodified lines | ||
| 118 | 120 | |
| 119 | 121 | pthread_join(id1, NULL); |
| 120 | 122 | pthread_join(id2, NULL); |
| 123 | +#if !defined(__arm__) && !defined(__APPLE__) | |
| 121 | 124 | pthread_join(id3, NULL); |
| 125 | +#endif | |
| 122 | 126 | sem_destroy (&sem); |
| 123 | 127 | sem_destroy (&sem_child); |
| 124 | 128 | |