Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!rutgers!mailrus!cwjcc!hal!ncoast!allbery From: allbery@ncoast.ORG (Brandon S. Allbery) Newsgroups: comp.databases Subject: Re: Vi using stderr for output. Message-ID: <13461@ncoast.ORG> Date: 12 Mar 89 00:41:02 GMT References: <198069@hrc.UUCP> <85@dsinc.UUCP> <577@marob.MASA.COM> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.databases Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 24 As quoted from <577@marob.MASA.COM> by daveh@marob.MASA.COM (Dave Hammond): +--------------- | In article <85@dsinc.UUCP> syd@dsinc.UUCP (Syd Weinstein) writes: | > Vi does its terminal | >work with stderr, so it barfs. What you need to do is close(2), | >dup2(1,2) or just dup(1) after the fork. | | On what system? | | $ vi xyz > foo | :wq | $ cat foo +--------------- You misunderstand. Vi does the switching from cooked to cbreak (icanon to -icanon on System III/V/Xenix)) on stderr. I/O is on stdin and stdout. This is why vi doesn't properly go into cbreak mode when invoked from Accell. ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser