🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32149

Malloc()-owner in system()-call

#32149
From: Edgar Roeder
Date: Tue, 26 Apr 1988 13:09
15 lines
1083 bytes
I have some problems with the installation of a system-call via the
_shell_p - Interface.
Whenever i call system() inside some program P and then call malloc() inside
the system()-routine, i get a crash after returning from P. I think this is
because the allocated space was owned by the program P and not by the shell.
My shell however needs this allocated space for history-substitution,
variable-values etc.
Now here is my question:
	Is there some way to tell TOS, that the owner of this Malloc()-ated
	space is another program ?  Or equivalent: can i substitute the current
	process P by the shell during the Malloc()-call ? (only setting the
	system-variable _current_proc at 0x602C seems not to work)

 -- Edgar
Technical Details
Message-ID: <487@sbsvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!unido!sbsvax!roeder

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!unido!sbsvax!roeder
From: roeder@sbsvax.UUCP (Edgar Roeder)
Newsgroups: comp.sys.atari.st
Subject: Malloc()-owner in system()-call
Message-ID: <487@sbsvax.UUCP>
Date: 26 Apr 88 13:09:12 GMT
Organization: Universitaet des Saarlandes, D-6600 Saarbruecken, FRG
Lines: 15
Keywords: _shell_p, system(), Malloc()