Article View: comp.sys.atari.st
Article #25137Re: Question on Exec with Lattice C
From: john
Date: Tue, 17 Feb 1987 19:49
Date: Tue, 17 Feb 1987 19:49
38 lines
2225 bytes
2225 bytes
In article <852@laidbak.UUCP> tm@laidbak.UUCP (Takis Mercouris) writes:
>I suspect that the Lattice C equivalent of pexec is the ridiculously
>named shel_write, ...
............................
>Is this indeed the equivalent of pexec, and if not which one is it?
No, it isn't. Not having Lattice for the ST, I can't tell you which
function to use, but I'm sure that one isn't it. shel_write is an odd
GEM function which sets up an alternate program (other than the desk-top
or your current command shell) that will run on exit.
The function number $48 listed in the Abacus "internals" book is correct.
>
>Also, I looked in some usenet code (I think stmake) and the author seemed to
>be encoding the length of the tail in its first byte. However, this is not
>documented neither in my Lattice C manual (of course), nor in the Abacus
>internals.
>
No, it isn't documented anyplace I've looked, but that -is- the correct
way to call pexec. The first byte of the command tail string must contain
the number of bytes in that string. Some people have been passing a pointer
to the first byte after the program name which is normaly a space. This is
fine as long as the programmer never uses a command tail longer than 32
bytes, but most people don't type command lines longer than that. When they
finaly do try something that takes lots of typing, they (or some poor
unsuspecting user) gets fried when the system stops noticing anything
after the 32nd character...
Hope this helps....
---
John L. Stanley (john@viper.UUCP)
Software Development Consultant - DynaSoft Systems
UUCP: ...{amdahl,ihnp4,rutgers}!{meccts,dayton}!viper!john
Technical Details
Message-ID:
<545@viper.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!amdahl!meccts!viper!johnReferences:
<852@laidbak.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!amdahl!meccts!viper!john From: john@viper.UUCP Newsgroups: comp.sys.atari.st Subject: Re: Question on Exec with Lattice C Message-ID: <545@viper.UUCP> Date: Tue, 17-Feb-87 14:49:32 EST Article-I.D.: viper.545 Posted: Tue Feb 17 14:49:32 1987 Date-Received: Wed, 18-Feb-87 20:35:54 EST References: <852@laidbak.UUCP> Reply-To: john@viper.UUCP (John Stanley) Organization: DynaSoft Systems Lines: 38