ASyncRun problems
1 messages in this thread
ASyncRun problems: here's a reliable way to crash the system.
It only crashes if an input file handle is supplied in pcb.pcb_Input.
Output files work OK. Given the following DB symbol definitions:
V arpbase=*ArpBase
V asyncrun=*(arpbase-220)
V boom=asyncrun+310 this is where it crashes!
Breakpoint
Pc=00c0e314 Sr=0008 x=0 n=1 z=0 v=0 c=0
d0-7:ffffffff ffffffff 00000000 00000000-00c3dfe0 00004e20 000200bf
0030f7f7
a0-7:00c08b1c 0008e13a 00c3eba4 0008e068-00c3eae8 00c3eae8 00c097c4
00c3b250
boom not.l (a2,d0)
This is using:
Kickstart version 34.5. Workbench version 34.28. ARP version 39.1, ARP
Shell.
What's wrong?
#include <functions.h>
#include <libraries/arpbase.h>
#include <libraries/dosextens.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
struct ProcessControlBlock pcb;
main()
{
pcb.pcb_StackSize = 20000L;
pcb.pcb_Pri = 0;
pcb.pcb_Control = 0L; /* child will Close() files */
pcb.pcb_TrapCode = (APTR)0L;
pcb.pcb_Input = Open("CON:0/150/640/50/W4", MODE_READWRITE);
pcb.pcb_Output = (BPTR)NULL;
pcb.pcb_Console.pcb_SplatFile = (BPTR)NULL;
pcb.pcb_WBProcess = NULL;
pcb.pcb_LoadedCode = (CPTR)0L;
pcb.pcb_LastGasp = NULL;
ASyncRun(command, args, &pcb);
}