Newsgroups: comp.parallel.pvm
Path: ukc!uknet!EU.net!howland.reston.ans.net!torn!nott!bnrgate!bmerha64.bnr.ca!bcars267!bcarh54a!bcarh946!rdavison
From: rdavison@bcarh946.bnr.ca (rob davison)
Subject: passing args via pwm_spawn
Message-ID: <1994Feb9.173438.18656@bcarh54a.bnr.ca>
Sender: rdavison@bcarh946 (rdavison)
Date: Wed, 9 Feb 1994 17:34:38 GMT
Nntp-Posting-Host: bcarh946
Organization: Bell-Northern Research, Ottawa, Canada
Lines: 31

I am a newbie at PVM so I thought I would change one of the
examples to see what happens.
I want to pass arguments to the spawned process via pvm_spawn.
When I run "hello" I get an error.
What is wrong?
Also, are there any opinions on whether it is better to pass args
via pvm_spawn or via a msg? 
The code is:

#include "pvm3.h"

main()
{
	int cc, tid;
	char buf[100];
	char *argv[4];

	argv[0] = "ROB";
	argv[1] = "DAVISON";
	argv[2] = "154976";
	argv[3] = (char*)0;

	printf("i'm t%x\n", pvm_mytid());

	cc = pvm_spawn("hello_other", argv, 0, "", 1, &tid);
	printf("\n\n%d   %d",cc,tid);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ prints cc=0, tid =-7
	...etc

Thanks,
Rob

