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,a33ec7badc330d9e X-Google-Attributes: gid103376,public From: Sandy Wise Subject: Re: Ada Equivalent of "system()" in C? Date: 1996/04/22 Message-ID: <317BC9E4.41C6@cs.umass.edu>#1/1 X-Deja-AN: 150839284 references: <4l1dbi$pho@rational.rational.com> content-type: text/plain; charset=us-ascii organization: Organization? I thought chaos would take care of that... mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0b2 (X11; I; OSF1 V3.2 alpha) Date: 1996-04-22T00:00:00+00:00 List-Id: Here is a bit of POSIX.5 code that I use to model the C system() function. I have used it successfully under VADS 6.2.3 on the DEC Alpha, and IBM RS/6000... Its semantics are close to those documented for the Digital UNIX version of system(). Posix_Process_Primitives.Open_Template ( ATemplate ); Posix.Append ( Args, Posix.To_POSIX_String("-c") ); Posix.Append ( Args, Posix.To_POSIX_String( Command ) ); Posix_Process_Primitives.Start_Process_Search ( PID, Posix.To_POSIX_String("/bin/sh"), ATemplate, Args ); Posix_Process_Primitives.Wait_For_Child_Process ( AStatus, PID ); Posix_Process_Primitives.Close_Template ( ATemplate ); -- Alexander Erskine Wise/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\ WISE@CS.UMASS.EDU /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ /\/\/\/\/\/\/\/\/\/\/\/\/\Laboratory for Advanced Software Engineering Research