Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 18th, 2008, 8:06 PM   #11
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 403
Rep Power: 3 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
Re: register_shutdown_function() not behaving as expected

The 'x' parameter make the fopen function return a FALSE if the file already exists. So basically the idea is that if you wanted to lock a file like 'tmp.txt'. Another file called tmp.txt.lck would be created. Any other process that tried to lock it (by creating tmp.txt.lck) would fail. Of course one would have to program those other scripts to poll (by sleeping for some period) the lock. Or I may actually program that into the acquireLock() method if the fopen function returns a failure, then sleep and try again and only return on a successful lock acquisition. That's actually what the thread regarding "file locking without using flock()" was about.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
grimpirate is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unqualified ID Expected? SonicReducer C++ 3 Mar 28th, 2007 5:29 PM
error 3 Expected end-of-statement m0rb1d Other Scripting Languages 0 Dec 12th, 2006 10:05 AM
error: expected primary-expression... rup C++ 18 Apr 17th, 2006 2:24 PM
realloc not functioning as expected nnxion C 24 Nov 29th, 2005 6:20 PM
Total noob, trouble expected? Mudanie Python 18 Oct 27th, 2005 10:03 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC