public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf@cygnus.com>
To: jmm@raleigh.ibm.com
Cc: gnu-win32@cygnus.com
Subject: Re: pid problem found
Date: Mon, 08 Feb 1999 07:06:00 -0000	[thread overview]
Message-ID: <19990208100534.A24249@cygnus.com> (raw)
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@raleigh.ibm.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@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: Christopher Faylor <cgf@cygnus.com>
To: jmm@raleigh.ibm.com
Cc: gnu-win32@cygnus.com
Subject: Re: pid problem found
Date: Sun, 28 Feb 1999 23:02:00 -0000	[thread overview]
Message-ID: <19990208100534.A24249@cygnus.com> (raw)
Message-ID: <19990228230200.Xa7a6A25B_H2twEPfubEXyzbN80YcPGLpWCJeI1GDmw@z> (raw)
In-Reply-To: <199902081459.JAA25236@jmm.raleigh.ibm.com>

On Mon, Feb 08, 1999 at 09:59:49AM -0500, jmm@raleigh.ibm.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@sourceware.cygnus.com


  parent reply	other threads:[~1999-02-08  7:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-07 19:27 jmm
     [not found] ` < 199902080327.WAA24699@jmm.raleigh.ibm.com >
1999-02-07 20:09   ` Christopher Faylor
1999-02-28 23:02     ` Christopher Faylor
1999-02-08  6:22 ` John Mullee
     [not found]   ` < 36BEF2B3.4A3B0C4C@exmachina.net >
1999-02-08  6:31     ` jmm
     [not found]       ` < 199902081430.JAA25094@jmm.raleigh.ibm.com >
1999-02-08  6:40         ` Christopher Faylor
     [not found]           ` < 19990208093853.A24123@cygnus.com >
1999-02-08  6:43             ` jmm
     [not found]               ` < 199902081443.JAA25182@jmm.raleigh.ibm.com >
1999-02-08  6:48                 ` Christopher Faylor
     [not found]                   ` < 19990208094644.A24171@cygnus.com >
1999-02-08  6:59                     ` jmm
     [not found]                       ` < 199902081459.JAA25236@jmm.raleigh.ibm.com >
1999-02-08  7:06                         ` Christopher Faylor [this message]
1999-02-28 23:02                           ` Christopher Faylor
1999-02-28 23:02                       ` jmm
1999-02-28 23:02                   ` Christopher Faylor
1999-02-28 23:02               ` jmm
1999-02-28 23:02           ` Christopher Faylor
1999-02-08  6:47       ` John Mullee
1999-02-28 23:02         ` John Mullee
1999-02-28 23:02       ` jmm
1999-02-28 23:02   ` John Mullee
1999-02-28 23:02 ` jmm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990208100534.A24249@cygnus.com \
    --to=cgf@cygnus.com \
    --cc=gnu-win32@cygnus.com \
    --cc=jmm@raleigh.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).