tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Workaround for Suspended (tty output) in python?



I've just got bitten by this when updating packages:

  http://mail-index.netbsd.org/pkgsrc-users/2024/01/03/msg038706.html

On Sun, Dec 31, 2023 at 03:48:00 +0000, Taylor R Campbell wrote:

> > Date: Sun, 31 Dec 2023 02:25:06 +0000 (UTC)
> > From: John Klos <john%klos.com@localhost>
> > 
> > #0  0x000070df4cd7f0da in ioctl () from /usr/lib/libc.so.12
> 
> Do you know which ioctl it is?  Can you ktrace it?

TIOCGETP, I would presume.  readline-8.1.2/rltty.c:

  void
  rltty_set_default_bindings (Keymap kmap)
  {
  #if !defined (NO_TTY_DRIVER)
    TIOTYPE ttybuff;
    int tty;

    tty = fileno (rl_instream);

    if (get_tty_settings (tty, &ttybuff) == 0)
      _rl_bind_tty_special_chars (kmap, ttybuff);
  #endif
  }

The question is, why python tries to init readline when it's executing
a script and is not going to read any user input.

-uwe


Home | Main Index | Thread Index | Old Index