From: "Alex Oleynikov" Newsgroups: comp.os.msdos.djgpp References: <1026169200 DOT 645701 AT queeg DOT ludd DOT luth DOT se> Subject: Re: Stderr redirection problems Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <4kBW8.40866$%%2.1926141@news2.east.cox.net> Date: Tue, 09 Jul 2002 13:13:36 GMT NNTP-Posting-Host: 68.15.54.9 X-Complaints-To: abuse AT cox DOT net X-Trace: news2.east.cox.net 1026220416 68.15.54.9 (Tue, 09 Jul 2002 09:13:36 EDT) NNTP-Posting-Date: Tue, 09 Jul 2002 09:13:36 EDT Organization: Cox Communications To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Martin Str|mberg" wrote in message news:1026169200 DOT 645701 AT queeg DOT ludd DOT luth DOT se... > 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.) > Yes, I am sure. Actually, I am not using stdout, but rather send data to COM3 directly using PMCOM library calls. > > Right, > > MartinS