What's going on with my file descriptors ?
- From: Martin Baulig <martin home-of-linux org>
- To: michael ximian com
- Cc: gnome-components-list gnome org
- Subject: What's going on with my file descriptors ?
- Date: 13 Aug 2001 18:18:17 +0200
Hi guys,
so, there's something totally weird going on with my file descriptors.
- I start gdb /gnome/head/INSTALL/bin/guile and hit run
This opens the following file descriptors:
====
[martin einstein bonobo-extra]$ dir /proc/18791/fd/
total 0
lrwx------ 1 martin martin 64 Aug 13 18:03 0 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:03 1 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:03 2 -> /dev/pts/3
lr-x------ 1 martin martin 64 Aug 13 18:03 3 -> /gnome/head/INSTALL/bin/guile
lr-x------ 1 martin martin 64 Aug 13 18:03 4 -> /gnome/head/INSTALL/bin/guile
lrwx------ 1 martin martin 64 Aug 13 18:03 5 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:03 6 -> /dev/pts/3
====
- now I do some stuff in guile, read the ORBit imodule files and I have:
====
[martin einstein bonobo-extra]$ dir /proc/18791/fd/
total 0
lrwx------ 1 martin martin 64 Aug 13 18:04 0 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:04 1 -> /dev/pts/3
l-wx------ 1 martin martin 64 Aug 13 18:04 10 -> pipe:[358849]
lrwx------ 1 martin martin 64 Aug 13 18:04 11 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:04 2 -> /dev/pts/3
lr-x------ 1 martin martin 64 Aug 13 18:04 3 -> /gnome/head/INSTALL/bin/guile
lr-x------ 1 martin martin 64 Aug 13 18:04 4 -> /gnome/head/INSTALL/bin/guile
lrwx------ 1 martin martin 64 Aug 13 18:04 5 -> /dev/pts/3
lr-x------ 1 martin martin 64 Aug 13 18:04 6 -> pipe:[358845]
l-wx------ 1 martin martin 64 Aug 13 18:04 7 -> pipe:[358845]
lr-x------ 1 martin martin 64 Aug 13 18:04 8 -> /dev/urandom
lr-x------ 1 martin martin 64 Aug 13 18:04 9 -> pipe:[358849]
====
- stopped guile in gdb, backtraced and found out that fd 5 is the current
input file descriptor
- now I do a bonobo_get_object ("config:", "IDL:Bonobo/PropertyBag:1.0", &ev),
any other bonobo_get_object() call does the same.
Looking at the file descriptors, I have:
====
lrwx------ 1 martin martin 64 Aug 13 18:08 0 -> socket:[358985]
lrwx------ 1 martin martin 64 Aug 13 18:08 1 -> /dev/pts/3
l-wx------ 1 martin martin 64 Aug 13 18:08 10 -> pipe:[358849]
lrwx------ 1 martin martin 64 Aug 13 18:08 11 -> socket:[358965]
lrwx------ 1 martin martin 64 Aug 13 18:08 12 -> socket:[358990]
lrwx------ 1 martin martin 64 Aug 13 18:08 13 -> socket:[358985]
lrwx------ 1 martin martin 64 Aug 13 18:08 14 -> socket:[359078]
lrwx------ 1 martin martin 64 Aug 13 18:08 15 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:08 2 -> /dev/pts/3
lr-x------ 1 martin martin 64 Aug 13 18:08 3 -> /gnome/head/INSTALL/bin/guile
lr-x------ 1 martin martin 64 Aug 13 18:08 4 -> /gnome/head/INSTALL/bin/guile
lrwx------ 1 martin martin 64 Aug 13 18:08 5 -> socket:[358992]
lr-x------ 1 martin martin 64 Aug 13 18:08 6 -> pipe:[358845]
l-wx------ 1 martin martin 64 Aug 13 18:08 7 -> pipe:[358845]
lr-x------ 1 martin martin 64 Aug 13 18:08 8 -> /dev/urandom
lr-x------ 1 martin martin 64 Aug 13 18:08 9 -> pipe:[358849]
====
- guile correctly prints the return value of the (successful) bonobo_get_object()
call and then it hangs.
- gdb shows me that it's hanging in read() - and it assumes that 5 is still
its input file descriptor.
Now tried the same again, but with readline disabled:
====
[martin einstein bonobo-extra]$ dir /proc/19132/fd/
total 0
lrwx------ 1 martin martin 64 Aug 13 18:16 0 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:16 1 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:16 2 -> /dev/pts/3
lr-x------ 1 martin martin 64 Aug 13 18:16 4 -> pipe:[378644]
l-wx------ 1 martin martin 64 Aug 13 18:16 5 -> pipe:[378644]
lr-x------ 1 martin martin 64 Aug 13 18:16 6 -> /dev/urandom
lr-x------ 1 martin martin 64 Aug 13 18:16 7 -> pipe:[378648]
l-wx------ 1 martin martin 64 Aug 13 18:16 8 -> pipe:[378648]
====
Now doing to bonobo_get_object() and then
===
[martin einstein bonobo-extra]$ dir /proc/19132/fd/
total 0
lrwx------ 1 martin martin 64 Aug 13 18:16 0 -> socket:[379003]
lrwx------ 1 martin martin 64 Aug 13 18:16 1 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:16 10 -> socket:[379008]
lrwx------ 1 martin martin 64 Aug 13 18:16 11 -> socket:[379057]
lrwx------ 1 martin martin 64 Aug 13 18:16 12 -> socket:[379062]
lrwx------ 1 martin martin 64 Aug 13 18:16 2 -> /dev/pts/3
lrwx------ 1 martin martin 64 Aug 13 18:16 3 -> socket:[379010]
lr-x------ 1 martin martin 64 Aug 13 18:16 4 -> pipe:[378644]
l-wx------ 1 martin martin 64 Aug 13 18:16 5 -> pipe:[378644]
lr-x------ 1 martin martin 64 Aug 13 18:16 6 -> /dev/urandom
lr-x------ 1 martin martin 64 Aug 13 18:16 7 -> pipe:[378648]
l-wx------ 1 martin martin 64 Aug 13 18:16 8 -> pipe:[378648]
lrwx------ 1 martin martin 64 Aug 13 18:16 9 -> socket:[378983]
===
So, what the fuck is this doing with my input file descriptor ?
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]