Date: Wed, 24 Oct 2001 05:10:01 -0700 (PDT) From: Ian Dowse <iedowse@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/30993: xxgdb cannot open source file Message-ID: <200110241210.f9OCA1M86644@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: 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?200110241210.f9OCA1M86644>