Program repeatedly restarts when its console is closed

2010-12-06 Thread Arthur Norman
At the end of this message is a short program. It is linked as a windows-mode executable so when it is launched it does not have a console. It then allocates one and uses it. The expected behaviour is that when I run it a fresh DOS-style console appears and I can type a few chars in and they

Re: Program repeatedly restarts when its console is closed

2010-12-06 Thread Larry Hall (Cygwin)
On 12/6/2010 6:07 PM, Arthur Norman wrote: At the end of this message is a short program. It is linked as a windows-mode executable so when it is launched it does not have a console. It then allocates one and uses it. The expected behaviour is that when I run it a fresh DOS-style console

Re: Program repeatedly restarts when its console is closed

2010-12-06 Thread Greg Chicares
On 2010-12-06 23:07Z, Arthur Norman wrote: [...] It is not clear to me whether this is an issue of the mingw bits not handling things and exiting badly or of the cygwin execv behaving improperly. Eg it I write a very short program that goes basically execv(./bad0,...) and compile that using