Re: Semaphores without sysvmsg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, February 15, 2008 6:42 pm, Michael McGlothlin wrote:
> Does anyone have a good method of supporting semaphores when PHP's
> System V IPC functions can't be enabled? I'm trying to implement
> locking
> for using shmop (actually modifying someone elses code) and it
> requires
> sysvmsg but my shared host doesn't have this enabled.

mkdir is atomic, so you should be able to use that to create a
semaphore/lock

Just in case something gets wedged, you might check the
http://php.net/filemtime of the dir, and ignore anything super stale.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux