Xref: utzoo comp.unix.wizards:20737 comp.bugs.sys5:1229 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrcae!sauron!micky.columbia.ncr.com!wescott From: wescott@micky.columbia.ncr.com (Mike Wescott) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: stdio broken in SysV? Message-ID: <2010@sauron.Columbia.NCR.COM> Date: 23 Feb 90 19:47:05 GMT Sender: news@sauron.Columbia.NCR.COM Reply-To: wescott@micky.columbia.ncr.com (Mike Wescott) Organization: E&M-Columbia, NCR Corp, W Columbia, SC Lines: 19 I am trying to port a program. It blows up in fprintf because SysV stdio has the implicit assumption that a given file descriptor will be used by no more than one stdio stream. Which is broken? The program that does: fpin = fdopen(fd,"r"); fpot = fdopen(fd,"w"); Or the stdio that blows up in memcpy() called from doprnt() called by fprintf() in the same program? BTW the "implicit assumption" mentioned above is due to the fact that the array _bufendtab[] is indexed by fp->_file rather than by fp-_iob or built into the FILE structure itself. -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM