We are having a shared module. Which opens some files.(And obviously
reads, writes, closes them!). It opens & reads one particluar file &
closes it all correctly for 8 times. Sequence of log for Failure case is
:

open("/dev/zero", O_RDONLY) = 257
close(257) =0
open("/dev/zero", O_RDONLY) = 257
close(257) =0
open("/dev/zero", O_RDONLY) = 257
close(257) = 0
close(257) = 0 //FISHY Can a file descriptor be successfully closed 2
times?

open("/dev/zero", O_RDONLY) = 257
close(257) = 0

open("/the/particular/file", O_RDONLY) = 257
close(257) = 0
After this it prints an error msg : No such file or directory in case of
the failing 9th call, & for the succeeding first 8 calls it does a
read() of the particular file successfully. One more difference betwn
the success & failure logs is close() is called 2 times successfully on
the same FD in case of Failure.

The output I took is from truss command. (I am running solaris 2.6 & gcc
2.95.2)

Is it possible for a file descriptor to be successfully closed 2 times?
Additional Info :
Return value was zero in both the cases & both close() calls
occured one after the other. errno was Success after the both close()es.
I agree it is alarmingly strange, but it is happenning. The descriptor
in
question always has value 257 no matter how many times to try to do it.
        Problem is the code which opens the file is of RSA SEcurid Ace
Server of which we only have a library & no sources. I doubt its a
serious 
Solaris bug. How to go about this?

Help.

Parag
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to