TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Russell Coker
date: 1995-01-28 21:20:06
subject: Create/Open semaphore.

I am just doing my first usage of OS/2 semaphores and I wish to create a
named mutex semaphore that will be shared between multiple processes.  I
have a few questions:

What happens if the process that creates the semaphore dies?  Anything?

What happens if the process that owns the semaphore dies?  Does it get
freed upon the death of the owner or do I need to do a DosReleaseMutexSem()
in the exit list?

What happens when all processes that use a semaphore die?  Does it disappear?  


If it does disappear when all processes close it then this presents a
problem for creating a semaphore.  I want to try and create a semaphore and
then if the return code indicates that it exists I want to open it.  What
if it disappears between the create and the open?  Would I have to try and
create it again?


  Thanks for your assistance.


--- Maximus/2 2.02
* Origin: Multi - 61-3-739-7145 (3:633/363)
SEEN-BY: 12/2442 620/243 624/50 632/103 301 341 348 386 998 633/104 252 260
SEEN-BY: 633/363 371 373 379 634/384 635/301 502 503 636/100 638/100 640/820
SEEN-BY: 690/660 711/409 410 413 430 807 808 809 934 942 949 955 712/515
SEEN-BY: 713/888 800/1 7877/2809
@PATH: 633/363 260 371 635/503 632/348 711/409 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.