The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 01-06-2008
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
I suggest you change the close code to...

Code:
#ifdef TEST_CLOSE_FAILED
         rc=-1;
         errno=EIO;
#else
         rc=close(fd);
#endif
However, an alternative would be to put this file on it's own partition then force a dismount of that partition, effectively simulating the loss of access to the storage media.