🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5198

Re: Need something like exec() in Lattice

#5198
From: Matthew Dillon
Date: Tue, 04 Sep 1990 22:35
68 lines
3432 bytes
    Neither Manx nor Lattice handles exec or fork/exec properly (nor DICE
    for that matter).  It is not their fault however.  The problems are due
    to deficiencies in 1.3 .  As far as I know, 2.0 solves all the problems
    with new capabilities and calls.

    Here are the problems:
	(1) ^C propogation
	(2) Starting a task asynchronously
	(3) Starting a task asynchronously plus getting an exit code on completion
	(4) Starting a task synchronously
	(5) Starting a task synchronously plus getting an exit code on completion

    Execute() handles (2) and (4) with some amount of overhead but there is
    no way to propogate ^C (that I know of) so that it is able to interrupt
    the Execute()d program in case (4).  The latest SetPatch for 1.3 allows
    Execute() to use a resident RUN instead of loading it from disk.  Without
    the patch Execute() takes a huge amount of overhead.

    Aztec's fork/exec handles (1) and (5) but only through major hacks (which
    I have never and will never trust).

    Lattice's fork/exec stuff handles (3) and (5) but only works with non-BCPL
    programs (not a problem under 2.0).  However, I've other problems with
    Lattice's calls and do not trust them either.

    WShell has a patch to get the exit code from an Execute()d program, I
    believe, but this is non-standard and you cannot count on it in any
    third-party developement you do, and you still have the ^C propogation
    problem.

    2.0 has solutions to all of these problems but you must be running 2.0
    to take advantage of them.

					    -Matt

In article <350@cbmger.UUCP> peterk@cbmger.UUCP (Peter Kittel GERMANY) writes:
>In article <oliphant.3972@telepro.UUCP> oliphant@telepro.UUCP (Mike Oliphant) writes:
>>Does anyone know of a way to get behavior identical to Manx's exec family of
>>routines in Lattice?	I need to chain one program to another, loading the
>>second program over top of the first.
>
>Why not use the function Execute() of the Amiga exec library? You can
>pass it a complete CLI command line. If you want to let your old program
>leave the system then precede this command line with a "run" and then
>close down the first program. If you problems with input channels
>then use "newcli ... from batchfile". If you are more expert with
>Amiga topics then use LoadSeg().
>
>>  Manx does this beautifully, but Lattice
>>doens't seem to be able to do it at all.
>
>I can't believe that Manx is able to load a new program on top of it,
>into the same memory area, as I understand it from your posting.
>Also I think it cannot use the same task structure, so it just MUST
>open a new process. If Manx does all this, tell me, that would sound
>interesting.
>--
>Best regards, Dr. Peter Kittel      //     E-Mail to
>Commodore Frankfurt, Germany	   \X/	    rutgers!cbmvax!cbmger!peterk

--


    Matthew Dillon	    dillon@Overload.Berkeley.CA.US
    891 Regal Rd.	    uunet.uu.net!overload!dillon
    Berkeley, Ca. 94708
    USA
Technical Details
Message-ID: <dillon.5766@overload.Berkeley.CA.US>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!overload!dillon
References: <oliphant.3972@telepro.UUCP> <350@cbmger.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!overload!dillon
From: dillon@overload.Berkeley.CA.US (Matthew Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Need something like exec() in Lattice
Message-ID: <dillon.5766@overload.Berkeley.CA.US>
Date: 4 Sep 90 22:35:54 GMT
References: <oliphant.3972@telepro.UUCP> <350@cbmger.UUCP>
Lines: 68