Como dijeron antes, el fd queda abierto, entonces se
puede seguir accediendo a el, encontre algo que a lo
mejor te puede servir:

"After a file has been opened in the requested mode,
the connection between the process and the file is
noted by the process-table entry in the kernel. In
fact, the file descriptor returned by the open()
system call is an index into an array of open-file
descriptors in the process-table entry for the process
that opened the file. Most important for our
discussion: the permissions of the disk-based file
aren't consulted again....

Your question reminds me of a related phenomenon:
creating an ``invisible file'' that no one else can
list--with ls--much less access. You open a file then
erase it from the file system. You can still access
the file because the program that opened the file
refers to it through the file descriptor, not the file
name on disk. This approach is frequently used for
temporary files that you don't want accessed or
overwritten by other processes. I've written a
demonstration program to illustrate:
#include <stdio.h>

main()
{
   FILE *out;                   /* pointer to file */
   char str[100];               /* buffer */

   out = fopen("hidden", "w+"); /* open for appending
*/

   printf("Before file 'hidden' removed:\n\n");

   system("ls -C");             /* check that file is
there */

   system("rm hidden");         /* remove file from
directory */

   printf("\nAfter file 'hidden' removed:\n\n");

   system("ls -C");             /* verify file is gone
*/

   /* write into file */
   fprintf(out, "This is a line written to an
invisible file\n");  

   fseek(out, 0L, 0);           /* move to beginning
of file */

   fgets(str, 100, out);        /* read line just
written to file */

   printf("\n%s", str);         /* print out line just
read */

   exit(0);                     /* file deallocated
upon exit */
}
"

http://www.networkcomputing.com/unixworld/answers/002.html

saludos

Christian


                
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The 
Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html
-- 
Para desuscribirte tenés que visitar la página
https://listas.linux.org.ar/mailman/listinfo/lugar-gral/

/* Publica y encontra trabajo relacionado con softlibre en 
http://www.usla.org.ar/modules/jobs/ */

Si tenés algún inconveniente o consulta escribí a mailto:[EMAIL PROTECTED]

Responder a