X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=K9FVs/LwY05xmffhQJ1CdOBunwH+d AGftRcYxEall5Kj3I1e6SYrh2NTNWE6oGmry28QhgpHB5LJZCgec6uixwCNrym4h H18fLu5j+Rse+vhV3M5x7W3b3Mg95XlP3arRrLZcHM4CJKi/uAVWzvyI38k1X9of BArumBI8ql09Z8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=YFH2YvDv0V9X7DySEXu9GBF4I/E=; b=AOM q/IlFj1oi8xIgIZYI0NE8ag2FXarxL43qCxz7ETUa1/y8q1k6EApYsnm6VVDgFhg HxDnK+OmWJomqYQThuiMaNp1TaxGjeg9GgWRPbwWVbY8lzrZ6kZPVUR93nwkQaSe GbLI+AUSxsFug8cxnCLCthlolP0FkeDjMqPknNI4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mail110.syd.optusnet.com.au Date: Sat, 5 Apr 2014 13:29:05 +1100 From: Duncan Roe To: cygwin Subject: No I/O redirection under GDB Message-ID: <20140405022905.GA8268@dimstar.local.net> Mail-Followup-To: cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=y26AOypDAAAA:8 a=PO7r1zJSAAAA:8 a=M1kyBYkWWGkA:10 a=kwppVCPE-NkA:10 a=kj9zAlcOel0A:10 a=iaFubHWvAAAA:8 a=CCpqsmhAAAAA:8 a=mDV3o1hIAAAA:8 a=alyPdV2VR5phpl8Fj-UA:9 a=CjuIK1q_8ugA:10 a=Ox6Cc_31imIA:10 a=vBSyIwTBzAYA:10 X-IsSubscribed: yes I just found that gdb's "run" command doesn't action redirection (e.g. run /dev/pty2 2>&1, where the shell on /dev/pty2 is doing a long sleep). Instead, the invoked program gets the redirections as command line arguments. Looking through the archives, I found https://sourceware.org/ml/cygwin/1999-04/msg00355.html documenting this behaviour. Chris Faylor commented at the time that fixing it was more trouble than it appeared. That was 15 years ago - has anything changed since? Anyone up for this or should I have a go? I *could* simply make my target do the redirection itself, but that doesn't help anyone else. OTOH if changing gdb really *is* that hard, maybe I should just change my program anyway. Any advice welcomed, Cheers ... Duncan. -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple