From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17604 invoked by alias); 24 May 2011 13:27:04 -0000 Received: (qmail 17595 invoked by uid 22791); 24 May 2011 13:27:04 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 13:26:49 +0000 Received: by mail-bw0-f41.google.com with SMTP id 17so7095277bwz.0 for ; Tue, 24 May 2011 06:26:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.47.103 with SMTP id m39mr984225bkf.4.1306243609151; Tue, 24 May 2011 06:26:49 -0700 (PDT) Received: by 10.204.23.71 with HTTP; Tue, 24 May 2011 06:26:48 -0700 (PDT) Date: Tue, 24 May 2011 13:27:00 -0000 Message-ID: Subject: GDB: error detected on stdin From: Vikash Jain To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00126.txt.bz2 Hi All, I'm trying to pipe commands to gdb but I get the following messages. Will it cause any problems? How do i resolve the same? (gdb) Hangup detected on fd 0 error detected on stdin Python Script ============ #!/usr/local/bin/python import subprocess proc=subprocess.Popen('gdb',shell=True,stdin=su bprocess.PIPE,stdout=subprocess.PIPE,executable="/usr/local/bin/bash") proc.stdin.write('help') output=proc.communicate()[0] print output Script Log ========== [XXX@test ~/CAT/example]$ python -u main.py GNU gdb (GDB) 7.2.50.20110328-cvs Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-unknown-freebsd6.3". For bug reporting instructions, please see: . (gdb) Hangup detected on fd 0 error detected on stdin Best Regards Vikash Jain