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

Re: Do file descriptors survive to subshell?



On Sep 13, 10:54am, Sebastian Gniazdowski wrote:
}
} That's quite regretful, how to check if a read descriptor is valid?

Under "Conditional Expressions":

[...]

-r FILE
     true if FILE exists and is readable by current process.

[...]

In each of the above expressions, if FILE is of the form `/dev/fd/N',
where N is an integer, then the test applied to the open file whose
descriptor number is N, even if the underlying system does not support
the /dev/fd directory.

[...]



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