How to use named semaphore from child
问题 So basically I want to suspend a bit the child process after it's creation, just so the parent prepare some data for it in a shared memory. I'm trying to use a semaphore, as suggested here: How to share semaphores between processes using shared memory. Problem nr 1 : the child can't open the semaphore. Problem nr 2 : strerror returns an int, but man strerror clearly says it returns an char *. To avoid "what have you tried": sem = sem_open("/semaphore", O_CREAT, 0644, 0); for (i = 0; i < num;