Article View: comp.sys.amiga.tech
Article #10413Re: Problem trying to get RUN to work from processes w/no consoletask.
From: Matt Dillon
Date: Mon, 28 Nov 1988 19:29
Date: Mon, 28 Nov 1988 19:29
40 lines
2002 bytes
2002 bytes
>In article <8811200108.AA29768@postgres.Berkeley.EDU> dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) writes:
>> Anybody who's a *real* DOS guru (i.e. C-A) no how I can do:
>>
>> Execute("run Date", NULL, NULL);
>>
>> Without crashing the machine? Note that here I do not specify the
>>nil: file handles. I have not confirmed this, but I think by NOT using
>>the nil: file handles the Execute() also attempts to access "*" for a
>>brief period, causing the machine to become unstable.
>
>I know the problems you are having and plan to fix them up for 1.4.
>It's the use of the * as stderr that's biting us here, I suspect.
>
>However, the specific example
>
>Execute(run date",0L,0L); works fine on my 1.3 machine.
>
>(even if I run the program containing the Execute() statement)
Try doing it from a detached process, that was my point. RUN
the program that contains the Execute("run date",0L,0L), but before
the program does the Execute() close the console window:
RUN >nil: <nil: charliex
ENDCLI
(charliex fclose(stderr) to remove "*" dependancy)
(console goes away)
(charliex sets pr_ConsoleTask = NULL or something else ... or
leave it what it was if you want to gurarentee a crash. But
even changing it guarentees a crash pretty much).
(charliex now does an Execute("run Date",0L,0L))).
>Possibly you are hitting a 16 bit/ 32bit defined constant problem ?
>(or your compiler is opening * for you in some other manner)
No. I use 32 bit ints all the way, and since the console window
goes away, there are no file references.
-Matt
Technical Details
Message-ID:
<8811281929.AA18217@postgres.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!apple!bionet!agate!ucbvax!POSTGRES.BERKELEY.EDU!dillonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!apple!bionet!agate!ucbvax!POSTGRES.BERKELEY.EDU!dillon From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: Problem trying to get RUN to work from processes w/no consoletask. Message-ID: <8811281929.AA18217@postgres.Berkeley.EDU> Date: 28 Nov 88 19:29:08 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 40