Thread View: comp.unix.programmer
1 messages
1 total messages
Started by Johannes Sjogren
Wed, 17 Oct 1990 23:00
semget(2) - value of newly created semaphores?
Author: Johannes Sjogren
Date: Wed, 17 Oct 1990 23:00
Date: Wed, 17 Oct 1990 23:00
19 lines
1124 bytes
1124 bytes
I have a question about the behaviour of the semget(2) system call. If I do semid = semget(SEMKEY, 1, 0777|IPC_CREAT); and a new semaphore is created, is the value of a newly created semaphore guaranteed to be initialized to 0? On DG/UX 4.30 the manual page for semget says this is the case. On most other systems however the manual page says the value is undefined. Is there any reason why the semaphore value shouldn't be reset to 0 on creation? Maybe the (I suppose) system V derived "normal" manual pages are wrong? -- Johannes Sjogren sgren@dynas.se DynaSoft, Dynamic Software AB Phone: +46-8-726 85 60 Liljeholmsv 10, S-117 43 STOCKHOLM, SWEDEN Fax: +46-8-18 11 45
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads