/* hey_you.c: worker */
#include "pvm3.h"

main()
{
	int ptid;
	char buf[100];

	/* get parent id, so we know who to send data back to */
	ptid = pvm_parent();

	/* store "hello, world from hostname", where hostname is the
	   machine that the child process was spawned on, in a string 
	   called buf */
	strcpy(buf, "hello, world from ");
	gethostname(buf + strlen(buf), 64);

	/* send string buf back to parent */
	pvm_initsend(PvmDataDefault);
	pvm_pkstr(buf);
	pvm_send(ptid, 1);

	/* exit successfully */
	pvm_exit();
	exit(0);
}

