[mythtv-users] Race condition

Kyle Rose krose+mythtv at krose.org
Wed Oct 13 05:26:34 UTC 2004


I did a little digging tonight, and found this from an strace:

krose at nausicaa /tmp% cat /tmp/strace.log| grep -e '= 5$' -e 'close(5)' -e 'dup.*5' -e 'read(5' | head -50
open("/etc/fonts/local.conf", O_RDONLY) = 5
read(5, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 131072) = 629
read(5, "", 131072)                     = 0
read(5, "", 131072)                     = 0
close(5)                                = 0
open("/home/krose/.ICEauthority", O_RDONLY) = 5
read(5, "\0\3ICE\0\0\0#local/nausicaa:/tmp/.IC"..., 131072) = 8007
read(5, "", 131072)                     = 0
close(5)                                = 0
open("/home/krose/.ICEauthority", O_RDONLY) = 5
read(5, "\0\3ICE\0\0\0#local/nausicaa:/tmp/.IC"..., 131072) = 8007
close(5)                                = 0
open("/home/krose/.ICEauthority", O_RDONLY) = 5
read(5, "\0\3ICE\0\0\0#local/nausicaa:/tmp/.IC"..., 131072) = 8007
read(5, "", 131072)                     = 0
close(5)                                = 0
open("/home/krose/.ICEauthority", O_RDONLY) = 5
read(5, "\0\3ICE\0\0\0#local/nausicaa:/tmp/.IC"..., 131072) = 8007
close(5)                                = 0
read(9, "\0\0\0\2\0", 5)                = 5
read(9, "\0\0\0\2\0", 5)                = 5
read(10, "\0\0\0\2\0", 5)               = 5
read(10, "\0\0\0\2\0", 5)               = 5
read(9, "\0041057", 5)                  = 5
read(10, "\0046948", 5)                 = 5
read(10, "\0045000", 5)                 = 5
read(10, "\4halt", 5)                   = 5
read(10, "\4Down", 5)                   = 5
read(10, "\4Left", 5)                   = 5
read(10, "\4PgUp", 5)                   = 5
read(10, "\4Home", 5)                   = 5
read(10, "\4Left", 5)                   = 5
read(10, "\4Down", 5)                   = 5
read(10, "\4PgUp", 5)                   = 5
read(10, "\4PgUp", 5)                   = 5
read(5, "\0", 1)                        = 1
read(11, "\0\0\0\2\0", 5)               = 5
read(11, "\0\0\0\2\0", 5)               = 5
read(9, "\4None", 5)                    = 5
read(5, "\0", 1)                        = 1
read(9, "\0046543", 5)                  = 5
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
read(5, "\0", 1)                        = 1
.
.
.

Where the read(5, ...) continue ad nauseam in a loop until I break
out.  Note that nothing appears to be opening 5 after the last close,
yet all reads from that socket return "\0", length 1.  Is there some
other call I'm missing that will open a file descriptor?

Cheers,
Kyle


More information about the mythtv-users mailing list