![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating an Ajax Process Using PHP and Oracle | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 06:10 AM |
| creating 10 process | kpkant123 | Shell Programming and Scripting | 2 | 05-21-2007 06:28 PM |
| how can i check if text file is closed ? | umen | Shell Programming and Scripting | 13 | 01-12-2007 11:40 AM |
| creating child process | Confuse | High Level Programming | 12 | 05-27-2005 12:48 PM |
| file activity (open/closed) file descriptor info using KORN shell scripting | Gary Dunn | UNIX for Dummies Questions & Answers | 3 | 06-07-2004 02:54 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to know a new file is in process of creating? It has not been closed.
I am programming some data loader of oracle with unix c, when I find new data file, then read it to database and delete it. but one issue, if the file is in process of creating, not been closed yet. I will read zero or part of data content, this will cause problem. I want to know whether some unix system function can check this situation, avoid it.
Thanks! |
|
||||
|
Perderabo is correct some handshaking will be required.
Some OS may provide low level file locking facilities but these may not be guaranteed or portable. Another way of indicating a file has been completed is an associated 'trigger file'. e.g. myfile and myfile.trig The 'trigger' file will be an empty file and simply indicate the the real file is ready for processing. The naming convention is aribrary but the method could be used if there are restrictions in unique file naming from the system for whatever reason. Either method would be OK, it is just a matter of how you decide to implement your handshaking between processes. MBB |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|