Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* POSIX.4 Semaphore questions
@ 1997-11-18  5:00 Scott Moore
  1997-11-19  5:00 ` Dave Butenhof
  1997-11-19  5:00 ` Sajjad Lateef
  0 siblings, 2 replies; 4+ messages in thread
From: Scott Moore @ 1997-11-18  5:00 UTC (permalink / raw)



Hello-

I am new to using POSIX.4 semaphores, and I can not find any
documentation about how permissions are used.  I know that on the
sem_open(), if the caller has O_CREAT in the flags and a semaphore is
created, permissions are set to the values specified by the mode
parameter.

What I don't get is what the permissions mean.  Is it possible to have
the permissions 0604 or 0602?  In other words, does it make sense to
have Read only (or write only) permissions to a POSIX semaphore?  The
reason I ask this is because System V semaphores this makes sense, but I
am not sure of the POSIX implementation.    

If this is valid input on the sem_open, let's say that user A creates a
named semaphore:

sem_t semPtr = sem_open("/mysem", O_CREATE | O_EXCL, 0604, 0);

And user B accesses the semaphore with:

sem_t semPtr = sem_open("/mysem", 0);

Would this fail for user B?  Do you need both read and write access to
get the semaphore?

Thank you for any input! 
Scott



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-11-19  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-11-18  5:00 POSIX.4 Semaphore questions Scott Moore
1997-11-19  5:00 ` Dave Butenhof
1997-11-19  5:00   ` Scott Moore
1997-11-19  5:00 ` Sajjad Lateef

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox