sem_open(3) and FBSD 5.2 : what the point ?

2004-02-06 Thread Eric Jacoboni
Hi, Here's a sample code: #include stdio.h #include semaphore.h int main(void) { sem_t *dis_ping, *dis_pong; dis_ping = sem_open(/ping.sem, O_CREAT, 0777, 1); dis_pong = sem_open(/pong.sem, O_CREAT, 0777, 0); for(;;) { sem_wait(dis_ping); puts(Ping...);

Re: sem_open(3) and FBSD 5.2 : what the point ?

2004-02-06 Thread Dan Nelson
In the last episode (Feb 06), Eric Jacoboni said: Here's a sample code: #include semaphore.h ... dis_ping = sem_open(/ping.sem, O_CREAT, 0777, 1); ... On FBSD 5.2, gcc first complains it doesn't know about O_CREAT... That's not what the sem_open() manpage claims but, ok, let's include