[oclug] fifo named pipes and file descriptors
bart-oclug at jukie.net
Sun Mar 3 14:25:09 EST 2002
* Greg Sarsons <gsarsons at istop.com> [020303 14:15]:
> if I create a named pipe called /tmp/public and open it I get a file
> descriptor of 3.
> now if I go to another program and open /tmp/public will the file
> descriptor be the same?
This depends on the order of opening files by a process. The first time
you open a file under a new and normal process the fd will be 3. You
are not guaranteed this but is just the way people have implemented it.
Unless processes are related there is no correlation between an fd from
one process and an fd from another.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20020303/3a6c33f6/attachment.bin
More information about the OCLUG