sh: semaphore pipe write helps with a weird race condition

This commit is contained in:
K. Lange 2021-06-05 16:16:20 +09:00
parent d9e462633f
commit 5240ff7458

View File

@ -86,6 +86,7 @@ struct semaphore create_semaphore(void) {
}
void raise_semaphore(struct semaphore s){
write(s.fds[1],"x",1);
close(s.fds[0]);
close(s.fds[1]);
}