This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/12294] fopen("/dev/tty","r"); return NULL
- From: "silvia_si at hotmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 7 Dec 2010 21:23:39 +0000
- Subject: [Bug gdb/12294] fopen("/dev/tty","r"); return NULL
- Auto-submitted: auto-generated
- References: <bug-12294-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12294
silvia_si at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|fopen("/dev/tty","r"); |fopen("/dev/tty","r");
| |return NULL
--- Comment #1 from silvia_si at hotmail dot com 2010-12-07 21:23:33 UTC ---
Ubuntu 10.04 kernel 2.6.32-26-generic
Netbeans 6.8
GDB 7.1-ubuntu
Set Console type to Gnome terminal.
FILE *input = NULL;
input = fopen("/dev/tty","r");
returns NULL in debug mode (works fine in Run mode).
How to re-produce:
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>
main{
FILE *input = NULL;
input = fopen("/dev/tty","r");
}
In debug mode, fopen("/dev/tty","r"); return NULL.
This bug may be related to Bug 11403 - Failed to set controlling terminal,
as "/dev/tty" is the controlling terminal.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.