This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setsid() does not call FreeConsole() even if all files are closed


On Sun, 13 Nov 2005, Christian Franke wrote:

> Igor Pechtchanski wrote:
>
> > [...]
> >
> > Yep, so, as CGF noted, try
> >
> > $ /usr/sbin/syslogd >/dev/null 2>&1 </dev/null
> > $ exit
>
> That makes no difference. Shell exits but console window persists (at
> least on XP SP2) until syslogd is terminated.
>
> Did you get a different result?

No, I actually was able to reproduce your result without using syslogd:

$ setsid sleep 10 >/dev/null 2>&1 </dev/null
$ exit

(shell prints "logout", but window remains until sleep is over).

In fact, closing the file descriptors doesn't work either:

$ setsid sleep 10 >&- 2>&- <&-
$ exit

(same result).
I've generated the strace for the above cases, and will take a deeper look
when time permits.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]