Ask a Question related to UNIX Programming, Design and Development.
-
Michael B Allen #1
Re: SysV Semaphore Troubles
On Sun, 03 Aug 2003 12:21:05 -0400, Marc Rochkind wrote:
The troubling scenario is when the program increments or decrements the> Can you be more precise about what you mean by "the semaphores are left>> I have written a simple POSIX-like abstraction for System V semaphores:
>>
>> [url]http://users.erols.com/mballen/c/svsem.c[/url]
>>
> in the state they were initialized to?"
>
> I notice that you remove the semaphore set on a close.
semaphore so that it has a value that is not the value it was initialized
to and then exits without calling close().
Another process that opens the semaphore will see it already exists
and therefore not initialize it. It will have the value the last errant
process left it with.
I want multiple callers to be able to access the semaphore without
reinitializing it each time it's opened. It should only be initialized
when it is created.
Mike
Michael B Allen Guest
-
ANNOUNCE: POSIX::RT::Semaphore 0.01
POSIX::RT::Semaphore is a Perl interface to POSIX.1b (Realtime) semaphores, at least as supported by your system. ;-) RT semaphores are objects... -
semaphore example needed
Hi all, I tried to use IPC::Semaphore but tried for a long time without success. What I want to do is like this : I want to limit a perl... -
Ambiguity in SysV IPC keys
In SysV IPC, when you call ftok() to get a key, the key is not guaranteed to be unique. How do people code around this potential key ambiguity in... -
Semaphore tutorial?
Does anybody have a good tutorial for how SysV semaphores work, specifically the semop() function? I've read the description in Stevens' Unix... -
Dpkg without sysv-rc
hey, one more question, by a strange set of circumstances, I have sysvinit (testing version), initscripts (testing version) installed, but didn't...



Reply With Quote

