[net.micro.mac] Megamax execv

baron@runx.OZ (Jason Haines) (01/18/86)

Anyone out there ever use the execv function in the Megamax C library?
I am trying to create a transfer function using it and this is is it :-

transfer(arg)
char *arg[];
{
	int err;
	char fname[256];
	
	err = getfile("APPL",fname); /* getfile takes the arguments and uses
					SFGetFile to get the filename */
	if (err)
		execv(fname,arg);
}

This function is separately compiled, and I jotted up a main to drive it :-

main()
{
	transfer("");
}

This works fine, but when I try to use transfer() in a larger program, it
crashes with a DS error #26 ( bad launch .

Any solutions?

Jason Haines
ACSnet : munnari!basser!ipso!runx!baron