× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Rick,

Is it possible that you opened the file twice, but only closed it once?

Or perhaps you ran the program the first time, and the program crashed, leaving the file open? The second run opened the file a second time, and then closed it successfully, but the original run still has the file open?

OR some similar idea? (Like an IF statement that ends the routine prematurely because of some condition -- but forgets to close the file.)

Basically, there are a million variations on this... but they come down to the same thing. Every successful call to open() must be followed by a corresponding successful call to close(). If for any reason one of those closes is missing -- even if subsequent ones are closed successfully -- the file will remain open and locked.


Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
I have a situation in an interactive program where the file appears to be locked even though the program has ended. To free the file I have to sign off. I verified that the close operation is performed and the return code = 0 so I think it should be closed. Searching the archives, Google, and Info Center didn't turn up anything useful. I did try adding the fsync function call in case it was an issue with the buffer not being flushed.

Does anyone have any ideas?

Rick Chevalier




Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.