1833468 Members
3074 Online
110052 Solutions
New Discussion

semaphore

 
SOLVED
Go to solution
Victor.Lin
Occasional Contributor

semaphore

After a process creat a semaphore, how can other processes attach this semaphore ?
The following functions are listed in :
sem_init()
sem_destroy()
sem_open()
sem_close()
sem_wait()
sem_trywait()
sem_post()
sem_unlink()
sem_getvalue()
After typing "man" command 9 times, I find that there is no function for semaphore attach.
By the way, I can find what I want quickly using the online help while coding under SCO Unix.


2 REPLIES 2
Juan González
Trusted Contributor
Solution

Re: semaphore

Hi Victor,
you can attach to a semaphore with the function sem_open() if it was created before.

Best Regards
JGM

Klaus Crusius
Trusted Contributor

Re: semaphore

When coding in vi, try


:!man -k semaphore

(in order the -k option of man to work, root has to run "catman -w" some time before).
There is a live before death!