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

Re: Close *all* file descriptors



On Sun, May 22, 2022 at 12:50 PM Dominik Vogt <dominik.vogt@xxxxxx> wrote:
>
> Or simpler:
>
>   $ ...  $(lsof -p $$ -F F | grep "^f[0-9]*$" | tr -d f) ...

Or even:  ${${(M)$(lsof -p $$ -F F):#f<->*}#f}

Curiously, despite the man page for lsof asserting that PID filters
are applied first, if you add a -d filter to include only certain
types of descriptors, you get the descriptors for every process.




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