From: Martin Str|mberg Subject: Re: Stderr redirection problems Newsgroups: comp.os.msdos.djgpp References: User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha)) Message-ID: <1026169200.645701@queeg.ludd.luth.se> Cache-Post-Path: queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: 08 Jul 2002 23:00:00 GMT Lines: 27 NNTP-Posting-Date: 08 Jul 2002 23:00:00 GMT NNTP-Posting-Host: queeg.ludd.luth.se X-Trace: 1026169200 news.luth.se 464 130.240.16.109 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alex Oleynikov wrote: : I have a question about strange implications of using the redir utility. : To start the main application I use the following command line: : redir -e COM3 app.exe : The COM3 has a serial printer attached to it, which is used by the main : program as an audit trail printer to print legal information about the : user's actions (I use PMCOM to communicate with serial devices). : Now, everything is OK up until the moment when something is output to the : stderr stream. From that moment on the serial printer becomes invisible to : my program - nothing gets printed when the program sends it to COM3. Still, : the stderr output intercepted by redir gets down to the printer without any : problems. : It looks like redir keeps that COM-port open all the time after the first : moment it was accessed by this utility and this prevents the main program : from getting access to it. : Does anyone have any thoughts on this matter? Are you sure that the output doesn't come, but later? (stdout is buffered.) Right, MartinS