Newsgroups: comp.parallel.pvm
From: meister@isasun55 (Root)
Subject: XPVM and stdin of spawned tasks...
Organization: Fachbereich Informatik, TH Darmstadt, Deutschland
Date: 18 Mar 1996 10:00:01 GMT
Message-ID: <4ijc71$thh@rs18.hrz.th-darmstadt.de>

Hi,

I am wondering if it is possible to supply input to a task
which has been spawned from XPVM 1.1.1 (PVM 3.3.10).

It looks as if something is supplied to the task because a read
does not block as in the following example:

#include <stdio.h>
#include <pvm3.h>
#include <signal.h>

void sig_C(int par)
{

        printf("Interrupted --> Termination\n");
        pvm_exit();
        exit();
}

int main(int argc, char **argv)
{
        int tid;
        char buff[32];

        signal(SIGINT, sig_C);

        tid=pvm_mytid();

        while (1) {
                write(1, "Test it ", 9);
                read(0, buff, 10);
                buff[10]='\0';
                write(1, "REad: %s\n ", buff);
        }

        pvm_exit();
        exit(0);
}

The TaskOutput window always displays the string "Test it" 
although no input is supplied to it. What is the reason for
this strange beharior?

Additionally, the tclsh which was started by xpvm displays messages
like:

% libpvm [t40001]: pvm_upkbyte(): End of buffer
libpvm [t40001]: Error Unpacking Task Output: End of buffer

Warning: GOTEOF Unknown Task.

Warning: GOTEOF Unknown Task.

Console: unknown output msg t40001?

Bye,
	Gerd.

--
Gerd Meister        TH Darmstadt, Fachbereich Informatik      Verteilte Systeme
Alexanderstr. 6                                       D-64283 Darmstadt/Germany
Email: meister@informatik.th-darmstadt.de     Tel./Fax: +49-06151-16-5411/-3052 
URL:   http://www.informatik.th-darmstadt.de/VS/Mitarbeiter/Meister/
-------------------------------------------------------------------------------

