Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90973
| References | (1 earlier) <CAPTjJmoj4STV9+t2-9JWed3t6Hxk5ibtaxYSFfX31oGz=kKR1g@mail.gmail.com> <CANc-5UwUxYjg=rQQ0Z_nM3s7o4+ghVYzG-9ajQY=LERWAsPrKw@mail.gmail.com> <CAPTjJmrdPcW8EkLR9Kq+n9sYEWB8eJ3fg=_JFQ2x_4QhDeg90Q@mail.gmail.com> <mailman.139.1432045882.17265.python-list@python.org> <cs258eFnssnU1@mid.individual.net> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2015-05-20 12:30 -0600 |
| Subject | Re: fork/exec & close file descriptors |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.180.1432146694.17265.python-list@python.org> (permalink) |
On Tue, May 19, 2015 at 7:10 PM, Gregory Ewing <greg.ewing@canterbury.ac.nz> wrote: >> On Tue, May 19, 2015 at 8:54 AM, Chris Angelico <rosuav@gmail.com >> <mailto:rosuav@gmail.com>> wrote: >> >> On Linux (and possibly some other Unixes), /proc/self/fd may be of >> use. > > > On MacOSX, /dev/fd seems to be the equivalent of this. Not a perfect equivalent. On Linux, ls -lF /proc/self/fd shows the contents as symlinks, which is handy since you can just read the links to see what they're pointing to. On OSX, ls -lF /dev/fd shows three ttys and two directories. Though I also note that on my Ubuntu Trusty system, /dev/fd is itself a symlink to /proc/self/fd.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: fork/exec & close file descriptors Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-19 09:31 -0500
Re: fork/exec & close file descriptors Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-20 13:10 +1200
Re: fork/exec & close file descriptors Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-20 12:30 -0600
csiph-web