On Wed, 4 Jun 2003, Corinna Vinschen wrote: > On Wed, Jun 04, 2003 at 09:53:05AM +0200, Ronald Landheer-Cieslak wrote: > > On Tue, 3 Jun 2003, Corinna Vinschen wrote: > > > Does it help to set CYGWIN=notty before starting cron? > > Apparently not, no. > > > > Because I'm starting cron from the "startup" part of the start menu, I had > > to run it from a batch file ( > > set CYGWIN=notty > > cron.exe > > ) but I don't think that should make a difference. > Could you just for fun add a call to RegisterServiceProcess() (that > works on 9x/Me only) right before the setsid() call in the child code > and try again? I'd love to, but I have a Windows NT/4 box and thus don't have RegisterServiceProcess() (Windows NT Ver 4.0 Build 1381 Service Pack 6, as per cygcheck output attached to a previous message).
I've seen there's already a FreeConsole in setsid (and accoring to strace, it's called successfully) but, using process explorer, the forked-off cron process is not really detached from its parent by calling setsid. The parent is apparently waiting for the child until it detaches or dies (killing it kills the parent, but killing the parent doesn't kill the child). The same goes for the patched version: the child is not detached from the parent - the parent is just detached from the console which makes it invisible to the naked eye (but hey, practically everything is invisible to my naked eyes: without my glasses I don't see much of anything ;) The setsid code doesn't look too complicated - if you want I can experiment with it a little, but you'll have to tell me what kinds of experiments you want me to do :) HTH rlc -- 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/