Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Perl sysseek

by kwaping (Priest)
on Nov 17, 2006 at 15:59 UTC ( [id://584745]=note: print w/replies, xml ) Need Help??


in reply to Perl sysseek

A possible solution to a problem you have implied but not stated is this: Have your C program create an empty "signal file" somewhere while it's writing to the output file. Then have your Perl code check for the existance of this file (-e $file) on startup. The Perl code can then take action based on whether this signal file exists or not - exit, wait for a bit and try again, proceed anyway, etc. Once the C program is done with its write, it should remove the signal file.

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: Perl sysseek (race)
by tye (Sage) on Nov 17, 2006 at 18:34 UTC

    Race conditions. Using a file lock would be better.

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://584745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found