comp.lang.ada
 help / color / mirror / Atom feed
* Verdix-to-shell problem
@ 1991-11-21  3:53 N.B. Hedd
  0 siblings, 0 replies; 2+ messages in thread
From: N.B. Hedd @ 1991-11-21  3:53 UTC (permalink / raw)


I am trying to make a call to a UNIX shell script from within an Ada
program, have the script terminate, and return to the program. I am
able to call the system via unix_procs.execute, I think, but my program
never seems to return to the foreground. Can somebody with Verdix experience
on a Sun shed some light on this?

    Ada ---> shell script (with arguments) ---> return to Ada
-- 
------------------------------------------------------------------
Windows 3.0: the Mac interface done in crayon

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Verdix-to-shell problem
@ 1991-11-21 14:45 Dennis Doubleday
  0 siblings, 0 replies; 2+ messages in thread
From: Dennis Doubleday @ 1991-11-21 14:45 UTC (permalink / raw)


In article <1991Nov21.035339.21527nbh@netcom.COM>, nbh@netcom.COM (N.B. Hedd) w
rites:
|> I am trying to make a call to a UNIX shell script from within an Ada
|> program, have the script terminate, and return to the program. I am
|> able to call the system via unix_procs.execute, I think, but my program
|> never seems to return to the foreground. Can somebody with Verdix experience
|> on a Sun shed some light on this?
|> 
|>     Ada ---> shell script (with arguments) ---> return to Ada

I believe what you want to do is use the fork() operating system to call to
create another system process, then exec() the shell script in the fork'ed 
process.  Since the shell script will be running in a child process of the
process executing your Ada program, you then use the wait() operation to
wait for the termination of the child process before proceeding.



Dennis Doubleday  (dd@sei.cmu.edu)
Software Engineering Institute
Carnegie Mellon University
Pittsburgh, PA 15213  (412)268-5873

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1991-11-21 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-11-21  3:53 Verdix-to-shell problem N.B. Hedd
  -- strict thread matches above, loose matches on Subject: below --
1991-11-21 14:45 Dennis Doubleday

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