This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: console popping up unnecessarily in xterm (cygwin 1.3.3)
- To: cygwin-patches at cygwin dot com
- Subject: Re: console popping up unnecessarily in xterm (cygwin 1.3.3)
- From: Kazuhiro Fujieda <fujieda at jaist dot ac dot jp>
- Date: 06 Oct 2001 05:10:47 +0900
- References: <Liam.1001728633.534708.15417.245609177@mergioo><s1sn136np5r.fsf@jaist.ac.jp> <s1s4rpd9ard.fsf@jaist.ac.jp><20011005150433.A3171@redhat.com>
>>> On Fri, 5 Oct 2001 15:04:33 -0400
>>> Christopher Faylor <cgf@redhat.com> said:
> Hmm. I'm not sure that I understand the logic here. I understand why
> this would cure the problem with xterm since it uses a pty, but you're
> now saying that if a process is using ptys it should not free its
> console. That seems sort of arbitrary.
Well, I'll try to add explanation as far as I can.
When an application closes its controlling tty and calls
setsid(), it wants to become a daemon or start another session
with another controlling tty.
In the latter case, it can spawn a shell with the tty, then the
shell can spawn Windows applications. Some of them require their
console to show their output on WinNT/2K. If the console is
freed, these applications would allocate another console.
My tricks are mainly intended to distinguish the latter from the
former. In the latter, the application generally allocates a
pseudo tty. So the tricks check whether the application are
using it.
____
| AIST Kazuhiro Fujieda <fujieda@jaist.ac.jp>
| HOKURIKU Center for Information Science
o_/ 1990 Japan Advanced Institute of Science and Technology