From: "Alex Oleynikov" Newsgroups: comp.os.msdos.djgpp Subject: Stderr redirection problems Lines: 25 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: Date: Mon, 08 Jul 2002 20:30:03 GMT NNTP-Posting-Host: 68.15.54.9 X-Complaints-To: abuse AT cox DOT net X-Trace: news2.east.cox.net 1026160203 68.15.54.9 (Mon, 08 Jul 2002 16:30:03 EDT) NNTP-Posting-Date: Mon, 08 Jul 2002 16:30:03 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 Hi everybody, 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? Thanks in advance, Alex