comp.lang.ada
 help / color / mirror / Atom feed
From: "Condic, Marin D." <condicma@PWFL.COM>
Subject: Re: Spawning a subprocess and communicating with it.
Date: 1998/10/08
Date: 1998-10-08T00:00:00+00:00	[thread overview]
Message-ID: <F3740247C2BED111A0AE00805FEA9C92017FFD2F@pwflml02.pwfl.com> (raw)

Thanks for the reply. Looking at the GNAT code in the GNAT.OS_Lib package,
it's "Non_Blocking_Spawn" function degenerates to a C call after massaging
some parameters. Someone sent me an example of how to do this with Unix
calls, but then you've got something that can't automatically correct itself
if moved to the PC.

Unfortunately, I do have to have two separate processes. The problem is that
the client and the server have to be separate programs since the server
could be either another process running on the workstation, or on a
different workstation, or an embedded application in my engine control
computer. I need to design the connection so that the same program - or one
with slight variations - can talk to the simulated embedded machine or the
real embedded machine. I figure that breaks down into processes and pipes at
the workstation end.

The GNAT.OS_Lib routines work successfully and without change on both the
Sun and the PC, so this is good. The bad part is that I can't seem to get
the child process fired up in a different window and I'm not sure how to
open up the pipe between the two processes in a semi-portable manner. If you
think of anything that might help here, I'd appreciate it. Thanks.

> ----------
> From:         Roga Danar[SMTP:smithm@stelnj.com]
> Sent:         Thursday, October 08, 1998 4:02 PM
> To:   Condic, Marin D.
> Subject:      Re: Spawning a subprocess and communicating with it.
>
> Hi,
>
>   What you want to do could be done with a little 'C' used as a glue
> between
> the 2 Ada processes.  C has a routine that will call the OS.  You give it
> a
> string as you would on the command line and off you go.  Ada can,
> ofcourse,
> interface with the 'C' which can be as the communication line between the
> 2
> processes.
>
>   That said,  I cannot think of a situation off-hand that I would not use
> Ada
> native tasking to produce a current "process".  A task will not be another
> process, ofcourse.
>
>

Marin D. Condic
Real Time & Embedded Systems
United Technologies, Pratt & Whitney
Government Engines & Space Propulsion
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
Ph: 561.796.8997         Fx: 561.796.4669

"Today is the first day of the rest of your solitary, poor, nasty brutish,
and short existence on this planet"
       -- "Life In Hell"




             reply	other threads:[~1998-10-08  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-08  0:00 Condic, Marin D. [this message]
1998-10-09  0:00 ` Spawning a subprocess and communicating with it alan walkington
  -- strict thread matches above, loose matches on Subject: below --
1998-10-13  0:00 Condic, Marin D.
1998-10-13  0:00 ` Scott Ingram
1998-10-12  0:00 Condic, Marin D.
1998-10-13  0:00 ` Pascal Obry
1998-10-09  0:00 Condic, Marin D.
1998-10-09  0:00 Condic, Marin D.
1998-10-13  0:00 ` Robert I. Eachus
1998-10-07  0:00 Condic, Marin D.
1998-10-08  0:00 ` dennison
1998-10-08  0:00 ` Jerry van Dijk
1998-10-08  0:00 ` dennison
1998-10-05  0:00 Condic, Marin D.
1998-10-06  0:00 ` Robert L. Spooner
1998-10-06  0:00 ` dennison
1998-10-07  0:00 ` Jerry van Dijk
1998-10-07  0:00 ` John McCabe
1998-10-08  0:00   ` dennison
1998-10-01  0:00 Condic, Marin D.
1998-10-02  0:00 ` dennison
1998-10-02  0:00 ` Rick Stikkers
1998-10-05  0:00 ` John McCabe
1998-10-12  0:00 ` Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox