delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/22/20:52:49

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Jason Moxham <J DOT L DOT Moxham AT maths DOT soton DOT ac DOT uk>
Message-Id: <200105230037.BAA11274@malus.maths.soton.ac.uk>
Subject: spawn,exec,siganl strangeness?
To: cygwin AT cygwin DOT com
Date: Wed, 23 May 2001 01:37:43 +0100 (BST)
Cc: j DOT l DOT moxham AT maths DOT soton DOT ac DOT uk
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0

Thanks Christopher Faylor for your Ctrl-C explanation
(I don't really want Crtl-C , but SIGTERM is not generated by dos
windows on exit )

I wont include any source as its a distributed client/server app and you
need a lot of tools to compile it

prog1.exe is "like"

trap ctrl-C signals
do{printf("in prog1\n");fflush(0);
    spawnl(_P_WAIT,".\\prog2.exe",".\\prog2.exe",0);
  }while(1);


prog2.exe is "like"

trap ctrl-C signals
printf("in prog2\n");fflush(0);
do{
  }while(1);

when Ctrl-C {printf("exit prog2\n");fflush(0);exit(0);}

What happens under linux and B20.1 is that we get the output

in prog1
in prog2
exit prog2
in prog1
etc


which is what is expected

under latest cygwin 1.3.1 1.3.2 1.3.2-1 we sometimes get (about 1/2
time)

in prog1
in prog2
in prog1
exit prog2
in prog2

etc
 or some of the output is missing

the rest of the calculations that are done (that are not included here)
appear to be correct

What I'm asking is what sort of programming errors etc can produce this
sort of thing , and why it only seems to affect the latest cygwin

I realize that there is not much detail here ...

I do have B20.1 and latest cygwin installed on the same computer , but
cygwin1.dll is not the path , 

All this is run in a dos box with the relevant cygwin1.dll copyed to the
current directory


Jason Moxham
j DOT l DOT moxham AT maths DOT soton DOT ac DOT uk


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019