#168 On OpenSSI /proc/$$/fd only shows 1st 32 open FD's

closed-fixed
Filesystem (49)
5
2008-10-19
2008-07-31
John Hughes
No

perl -e 'for (1..100) {pipe "X$_", "Y$_"} ; system "ls /proc/$$/fd";'
0 10 12 14 16 18 2 21 23 25 27 29 30 4 6 8
1 11 13 15 17 19 20 22 24 26 28 3 31 5 7 9

What's happend to fd's 32 to 203?

When using recent glib's (glib2) this screws up the function g_spawn_async_with_pipes. This, for example, prevents gnome-terminal opening more than 10 windows. (It hangs when openening the 11th).

Discussion

  • John Hughes

    John Hughes - 2008-07-31

    Logged In: YES
    user_id=166336
    Originator: YES

    Ok, proc/fs/base.c was being a bit confused. Attached is patch that fixes problem.
    File Added: base.patch

     
  • John Hughes

    John Hughes - 2008-08-01
     
    Attachments
  • John Hughes

    John Hughes - 2008-08-01

    Logged In: YES
    user_id=166336
    Originator: YES

    Well, a little bug in that patch (off by 1 if we tried to return more dirents than the user buffer could hold). Here's a better one, that also moves all the +/-2 craziness to fs/proc/base.c
    File Added: proc-self-fd.patch

     
  • Roger Tsang

    Roger Tsang - 2008-09-28
    • labels: --> Filesystem
    • assigned_to: nobody --> hughesj
    • status: open --> open-accepted
     
  • Roger Tsang

    Roger Tsang - 2008-10-10

    checked into CVS trunk

     
  • John Hughes

    John Hughes - 2008-10-19
    • status: open-accepted --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks