[Top][All Lists]

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

[Fwd: SIGTTIN when exec-ing from .profile/.bashrc]

From: Mark T. Kennedy
Subject: [Fwd: SIGTTIN when exec-ing from .profile/.bashrc]
Date: Sat, 07 Jul 2001 16:43:15 +0000 (GMT)

i'm still seeing the problem reported here:


in bash 2.05 running under solaris 2.5.1, compiled with gcc v2.95.
bash is looping in the following fragment from jobs.c starting at line 2777:

 while ((terminal_pgrp = tcgetpgrp (shell_tty)) != -1)
   if (shell_pgrp != terminal_pgrp)
       SigHandler *old_ttin;

       old_ttin = set_signal_handler(SIGTTIN, SIG_DFL);
       kill (0, SIGTTIN);
       set_signal_handler (SIGTTIN, old_ttin);

e.g. when the login process has the PID 2332 and bash has the PID 2333,
shell_pgrp will be 2332 and terminal_pgrp will be 2333 and they don't change.
it seems like the "kill (0, SIGTTIN)" has no effect.


/mark kennedy

SIGTTIN when exec-ing from .profile/.bashrc

Chet Ramey address@hidden
Mon, 26 Mar 2001 12:22:32 -0500

> Machine Type: i386-redhat-linux-gnu
> Bash Version: 2.03
> Patch Level: 8
> Release Status: release
> Description:
> If bash2 is started as a login shell from /bin/login, and .profile or
> .bashrc use the exec builtin to replace the shell with another process
> then the newly exec-ed process appears to have problems reading from
> the terminal - strace shows such a process stuck in a tight loop,
> repeatedly processing SIGTTIN.
> This affects /bin/bash2 in the Redhat 6.x GNU/Linux distribution, as
> well as /bin/sh and /bin/bash on RedHat 7.0 (which are both bash v2).

Thanks; I fixed this this morning.  It will be in bash-2.05.

``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Attachment: mtk.vcf
Description: Card for Mark T. Kennedy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]