This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: rxvt pops up console with 2001-Aug-07 shapshot
>>> On Thu, 23 Aug 2001 10:35:44 +0200
>>> Corinna Vinschen <vinschen@redhat.com> said:
> I have played around with the FreeConsole a bit and I found
> that if we remove your patch from `setsid()' but let the
> corresponding patch in `dtable::dec_console_fds()' we could
> get the behaviour which seem to be expected:
(snip)
> Isn't that the compromise we're searching for or did I miss something?
Umm, such daemons as sshd and inetd close their fds connected
with their controlling terminals after they detach them, so
there is no need for my patch in `setsid()'. But it doesn't go
for ssh-agent.
I have another idea:
If the process has a pty slave, setsid() shouldn't call
FreeConsole() because it has a chance to execute Windows
application on the pty.
I will try it later.
> I can't remove the `AllocConsole()' from inetd, though. I just
> tried it again, hoping that Cygwin has changed the behaviour in
> the meantime. Unfortunately, when I remove the AllocConsole()
> call from inetd I'm again getting console windows resp. no output
> from `net start ...' in the telnet window.
>
> ... or... wait... would it perhaps help if the AllocConsole isn't
> used in inetd but in in.telnetd???
No, it wouldn't. The window will pop up when an remote user logs
in and remain until he/she logs out.
I propose inetd invokes AllocConsole only when it runs as a
service and hides the console window if there is the window on
the desktop. Can I implement it?
____
| AIST Kazuhiro Fujieda <fujieda@jaist.ac.jp>
| HOKURIKU Center for Information Science
o_/ 1990 Japan Advanced Institute of Science and Technology