This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: b20.1 bug, developers please help

Yep, forget about fork() under Win95.

Even if your App does launch, it will eventually crap out - perhaps not till
exitting, if your lucky.  Its just not reliable right now.  This is true
Win95 and Win95b.  I don't know about Win98.

fork seems to work fine under NT4.0, however.

If you're only trying to detach from the control terminal (daemonize) so
your process doesn't die when you close the shell - simply call the Win32
API function: FreeConsole(), and that will do it.

If you need fork under Win95 for other reasons I think you are SOL right

Interestingly, to properly detach under NT4.0 you need to BOTH fork()
AND call FreeConsole().  fork() alone will appear to release the shell,
i.e. you get the prompt back, but when you close the shell, your proc
goes with it.

But, just to clarify, under Win95 - ONLY call FreeConsole() .

Good Luck,

Steve B.

-----Original Message-----
From: creative1 <>
To: <>
Date: Thursday, March 04, 1999 6:12 AM
Subject: b20.1 bug, developers please help

>Hi there!
>I've trying to modify a unix program that works perfect on unix
>and doesn't work on windows. It compiles, I changed
>code so it could compile without any help on both systems.
>At the beginning the problem was with fork(), but I downloaded
>the lastest snapshops and it doesn't seems to crash there.
>(I am using windows 98 by the way).
>Anyway, when the program is launched to run foreground,
>it works perfect, but when launched on the background, it crash.
>I am not sure if it is still a fork bug or a tty bug or what it is
>since I can't figure it out.
>I am sure it is not my program bug since it runs an compile on several
>unixes, so could you take a look at it and see what's the problem?
>I am becoming crazy, I already changed makefiles and everything
>to suit the cygwin environment.
>You can download the program at:
>make install DEST=/directory
>Once you configure the kaosbot.conf.dist
>It runs perfect as:
>./kaosbot -c kaosbot.conf.dist -ntm
>But it crash as:
>./kaosbot -c kaosbot.conf.dist
>(which is the default since it goes to background).
>I have been 2 months trying it, at the beginning it was
>a fork bug on cygwin, but now with the snapshops i
>am not sure if that is the case since it dies a while
>To check if the program is still really working:
>telnet localhost 3333
>If it doesn't answer it is because it crashed.
>Thank you
>Joaquin Grech
>!     C r e a t i v i t y     M u s t    S u r v i v e        !
>!  Fido: 2:341/19.67                 Euronet: 25:928/100.67   !
>!  Internet:                            !
>!  Http://                  Ya me direis :)   !
>Want to unsubscribe from this list?
>Send a message to

Want to unsubscribe from this list?
Send a message to