Description
Many unices and unix-like OS-es support special directory in /proc (or elsewhere) to open inherited parent's proces file descriptors as files.
This is often used by advanced shell sub process redirection (bash, zsh and other more advanced shells).
Example:
$ nano <(ls)
# "opens" directory listing as editable buffer (incoming as "descriptor" file from shell, containing actual output of `ls`)
Unfortunately with micro this fails:
: micro <(ls)
Error: /proc/self/fd/11 is not a regular file and cannot be opened
Press enter to continue
micro is probably doing regular file check on it's input file argument and raw file descriptor fails this.
This might be some kind of protection.
However this should be at least specialcased for file prefixes like /proc/self/fd/* on linux, to allow for shell sub-process redirection to work.
Environment
Description
Many unices and unix-like OS-es support special directory in
/proc(or elsewhere) to open inherited parent's proces file descriptors as files.This is often used by advanced shell sub process redirection (
bash,zshand other more advanced shells).Example:
Unfortunately with micro this fails:
microis probably doing regular file check on it's input file argument and raw file descriptor fails this.This might be some kind of protection.
However this should be at least specialcased for file prefixes like
/proc/self/fd/*on linux, to allow for shell sub-process redirection to work.Environment