From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b12bc9a1cc5c6c3 X-Google-Attributes: gid103376,public From: "Condic, Marin D." Subject: Re: Spawning a subprocess and communicating with it. Date: 1998/10/08 Message-ID: #1/1 X-Deja-AN: 399122712 Sender: Ada programming language Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Content-Type: text/plain MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-10-08T00:00:00+00:00 List-Id: 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"