delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/02/08/15:06:54

Delivered-To: listarch-cygwin AT sourceware DOT cygnus DOT com
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Christopher Faylor <cgf AT cygnus DOT com>
Message-ID: <19990208100534.A24249@cygnus.com>
Date: Mon, 8 Feb 1999 10:05:34 -0500
To: jmm AT raleigh DOT ibm DOT com
Cc: gnu-win32 AT cygnus DOT com
Subject: Re: pid problem found
References: <19990208094644 DOT A24171 AT cygnus DOT com> <199902081459 DOT JAA25236 AT jmm DOT raleigh DOT ibm DOT com>
Mime-Version: 1.0
X-Mailer: Mutt 0.93i
In-Reply-To: <199902081459.JAA25236@jmm.raleigh.ibm.com>; from jmm@raleigh.ibm.com on Mon, Feb 08, 1999 at 09:59:49AM -0500

On Mon, Feb 08, 1999 at 09:59:49AM -0500, jmm AT raleigh DOT ibm DOT com wrote:
>> Somehow I still get the feeling that you're making this a lot more
>> complicated than is warranted.
>
>You're probably right, so let me throw out what I'm trying to do and
>get a knowledgable answer :)
>
>Program started out as just running and spawning x children, but run time
>was variable and we need to be able to either pass a "seconds to run"
>param or stop it with an event/signal (specifically, from a perl script
>that runs the parent process).  When signaled, the children will need
>to feed back one integer (for loop index, kept as a global var in each
>child) and exit.
>
>Approach was going to be have perl kill -ALRM the parent, have it handle
>and cascade the ALRM to children, read the integers from the pipes that
>were inherited by the children, and print some stats. (each child would
>handle ALRM by printf'ing the int and exit'ing)
>
>The code has to eventually be able to compile and run on just MS VC++
>(not my choice) w/o the cygwin dll, but I was hoping to use the cygwin
>stuff to just get it up and working and migrate over to pure Win32 after
>the fact (once the immediate need for something that works is done)

All of this is easily doable with cygwin using UNIX functions, as I've
indicated.  You will need a cygwin perl, though.

Otherwise, I don't believe that the above scenario won't work in a
Windows environment.  There is no equivalent to SIGALRM under standard
Windows.  There are probably other methods that you could use to accomplish
the same thing, though, like waiting for an event in a separate thread.

cgf



--   
Want to unsubscribe from this list?                             
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com


- Raw text -


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