Date: Thu, 31 Jan 2002 12:40:02 -0800 (PST) From: "Jin Guojun[ITG]" <j_guojun@lbl.gov> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/30993: xxgdb cannot open source file Message-ID: <200201312040.g0VKe2n74484@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/30993; it has been noted by GNATS.
From: "Jin Guojun[ITG]" <j_guojun@lbl.gov>
To: freebsd-gnats-submit@FreeBSD.org
Cc:
Subject: Re: bin/30993: xxgdb cannot open source file
Date: Thu, 31 Jan 2002 12:36:03 -0800
This problem still exists in 4.5-RELEASE. Ian has provided some
solution to this bug, I wonder if is this acceptable one or is
there a better solution?
If there is no other better solution to this problem, can we just
use this solution for now?
-Jin
-------- original discussion -------------
From: Ian Dowse <iedowse@maths.tcd.ie>
To: Jin Guojun <j_guojun@lbl.gov>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/30993: xxgdb cannot open source file
Date: Wed, 24 Oct 2001 13:00:59 +0100
In message <3BD616EC.40F97564@lbl.gov>, Jin Guojun writes:
>789 XtSetValues(sourceWindow, args, n);
>(gdb) s
>Warning: Cannot open file /tmp/x.c; Resource temporarily unavailable
Something within the X code must be interpreting a zero return from
open() as a failure - I've seen this with xxgdb, but rather than
digging into the X code I just changed xxgdb to not leave file
descriptors 0 and 1 closed. A patch is below.
Ian
--- orig/calldbx.c Wed Oct 24 12:38:41 2001
+++ calldbx.c Wed Oct 24 12:56:18 2001
@@ -311,6 +311,11 @@
*/
close(0);
close(1);
+ if (open("/dev/null", O_RDONLY) < 0 ||
+ open("/dev/null", O_WRONLY) < 0) {
+ perror("/dev/null");
+ exit(1);
+ }
#ifdef _POSIX_SOURCE
fcntl(master, F_SETFL, O_NONBLOCK);
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201312040.g0VKe2n74484>
