public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11403] Failed to set controlling terminal
       [not found] <bug-11403-4717@http.sourceware.org/bugzilla/>
@ 2014-09-12 22:19 ` sergiodj at redhat dot com
  2014-12-04 14:47 ` nikolay.koldunov at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: sergiodj at redhat dot com @ 2014-09-12 22:19 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=11403

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at redhat dot com

--- Comment #2 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Hi Egor and Jan, what is the status of this bug?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/11403] Failed to set controlling terminal
       [not found] <bug-11403-4717@http.sourceware.org/bugzilla/>
  2014-09-12 22:19 ` [Bug gdb/11403] Failed to set controlling terminal sergiodj at redhat dot com
@ 2014-12-04 14:47 ` nikolay.koldunov at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: nikolay.koldunov at oracle dot com @ 2014-12-04 14:47 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=11403

nikolay.koldunov at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nikolay.koldunov at oracle dot com

--- Comment #3 from nikolay.koldunov at oracle dot com ---
This is still valid at least on Solaris 11.2 and MacOS X 10.10 with GDB 7.7
Input is not redirected to a process being debugged but output from a process
appears in a terminal specified

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/11403] Failed to set controlling terminal
  2010-03-19 13:01 [Bug gdb/11403] New: " egor at sun dot com
@ 2010-08-15 20:02 ` jan dot kratochvil at redhat dot com
  0 siblings, 0 replies; 3+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-08-15 20:02 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jan dot kratochvil at redhat dot com  2010-08-15 20:02 -------
This issue started with:
[RFA] Fix GDB's handling of the inferior controlling terminal.
http://sourceware.org/ml/gdb-patches/2008-03/msg00103.html
(as reported by Alan Matsuoka)

The changed fixed other problems described there.

Either you should ignore the warning as it has the same functionality as gdb-6.x
before the change above.  For example signals do not work in that TTY, though. 
If you want to benefit from the fully dedicated TTY to the inferior process you
should run first the helper pasted below.

(One can discuss whether to call TIOCSCTTY with 0 (current) or 1.  IMO the
current value is right, 1 would not make it much easier and it would just
require root privileges plus make it whole less clear.)

I would suggest for GDB to make some notice to such a helper in the warning.
Thanks for the bugreport, is it OK this way?

------------------------------------------------------------------------------

/* tty;exec disowntty  */
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <signal.h>
static void
end (const char *msg)
{
  perror (msg);
  for (;;)
    pause ();
}
int
main (void)
{
  void (*orig) (int signo);
  setbuf (stdout, NULL);
  orig = signal (SIGHUP, SIG_IGN);
  if (orig != SIG_DFL)
    end ("signal (SIGHUP)");
  /* Verify we are the sole owner of the tty.  */
  if (ioctl (STDIN_FILENO, TIOCSCTTY, 0) != 0)
    end ("TIOCSCTTY");
  /* Disown the tty.  */
  if (ioctl (STDIN_FILENO, TIOCNOTTY) != 0)
    end ("TIOCNOTTY");
  end ("OK, disowned");
  return 1;
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan dot kratochvil at redhat
                   |                            |dot com
             Status|UNCONFIRMED                 |WAITING
   Target Milestone|7.1                         |7.2
            Version|7.0                         |7.1


http://sourceware.org/bugzilla/show_bug.cgi?id=11403

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-04 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11403-4717@http.sourceware.org/bugzilla/>
2014-09-12 22:19 ` [Bug gdb/11403] Failed to set controlling terminal sergiodj at redhat dot com
2014-12-04 14:47 ` nikolay.koldunov at oracle dot com
2010-03-19 13:01 [Bug gdb/11403] New: " egor at sun dot com
2010-08-15 20:02 ` [Bug gdb/11403] " jan dot kratochvil at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).