Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ico!vail!dougm From: dougm@ico.ISC.COM (Doug McCallum) Newsgroups: comp.unix.wizards Subject: Re: STREAMS module / dup question Message-ID: <15757@vail.ICO.ISC.COM> Date: 14 May 89 22:22:55 GMT References: <569@lehi3b15.csee.Lehigh.EDU> Reply-To: dougm@ico.ISC.COM (Doug McCallum,violet,114,) Organization: Interactive Systems Corp., Boulder CO Lines: 10 In article <569@lehi3b15.csee.Lehigh.EDU> murrey@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.