Hi,
Sorry if this is a remarkably simple question, but I am writing a process to run under cron to monitor for files and process them. I havent written C on Unix before but I understand that when a file is being written, as there is no locking I could in effect process a file that hasnt been copmpletely written.
Is there any programmable solution to check to see if the file is completely copied over. The only solution I can think of is to conintually poll the file on it exists and check to see if the file size stops growing, at which point I can assume that the file has been completely written ??
Am I write in thinking that under NT I wouldnt be able to get a handle on the file if another process was writing to it?
Once again sorry if this is a really simple qu.
John.
Sorry if this is a remarkably simple question, but I am writing a process to run under cron to monitor for files and process them. I havent written C on Unix before but I understand that when a file is being written, as there is no locking I could in effect process a file that hasnt been copmpletely written.
Is there any programmable solution to check to see if the file is completely copied over. The only solution I can think of is to conintually poll the file on it exists and check to see if the file size stops growing, at which point I can assume that the file has been completely written ??
Am I write in thinking that under NT I wouldnt be able to get a handle on the file if another process was writing to it?
Once again sorry if this is a really simple qu.
John.