STREAMS module / dup question

Doug McCallum dougm at ico.ISC.COM
Mon May 15 08:22:55 AEST 1989


In article <569 at lehi3b15.csee.Lehigh.EDU> murrey at lehi3b15.csee.Lehigh.EDU (Erik Murrey) writes:
...
>Questions:
>	1. Do both of those fd's have that module pushed on it?
>	2. What happens during a fork()?
Both fd's refer to the same stream so both have the module pushed on it.
A file descriptor refers to a kernel file structure that points to the
stream.  When you dup the descriptor you inherit the same stream.
It is the same principle that when you dup a tty descriptor the new one
refers to the same device so later ioctl calls have an effect on both.



More information about the Comp.unix.wizards mailing list