Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: timeout problem in ssh sessions



On Feb 17,  1:00am, Vincent Lefevre wrote:
}
} On 2008-02-15 19:26:16 -0800, Bart Schaefer wrote:
} > You can load the zsh/stat module and use
} > 
} > for fd in {0..63}; zstat -f $fd ...
} 
} How do you know which ones will block ssh?

Well ... unfortunately probably none of them will.  An X program is
going to look at $DISPLAY and open its own connection to the X server;
you can't discover that by examining the descriptors that zsh still
has open.  You'd need read access to /proc/$PPID/fd or the equivalent,
which generally you won't have because those will be owned by the
privileged user that started sshd (even though sshd itself will have
dropped privileges to become owned by the current user).



Messages sorted by: Reverse Date, Date, Thread, Author