In GT.M today, a parent and JOB'd child process cannot communicate via STDIN/STDOUT of the child process. The feature is under consideration for a future release, but is not there today. Here are some ideas:
1. Have the parent child create a FIFO (named pipe) and pass the name of the FIFO device to the child, e.g., in a global variable (you can use the parent's $ZJOB, which is the pid of the child, to create a unique index, or you can use the parent's pid which the child can get from its /proc/$JOB/stat).
2. Instead of the JOB command, have the child be a process spawned by inetd/xinetd in response to a connection attempt at a TCP port. The parent talks to a socket device, the child communicates with its $PRINCIPAL.
Regards
-- Bhaskar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi all,
1. how I set in job command the stdin/stdout parameters so the proceess that made
job ^TEST can interact with read/write with the jobbed ID ?
means:
from current pid
SET DEV="/dev/111/"
JOB ^TEST:(IN=DEV:OUT=DEV)
and then:
USE DEV WRITE " D ^PGMINTEST"
U DEV READ X
U 0 WRITE X,! ;-> WHAT THE JOBBED RESPONSE GOT
how I define the DEV ?
do I have to make open DEV.. and then USE ?
is there some sample code about ?
rgrds
EL
In GT.M today, a parent and JOB'd child process cannot communicate via STDIN/STDOUT of the child process. The feature is under consideration for a future release, but is not there today. Here are some ideas:
1. Have the parent child create a FIFO (named pipe) and pass the name of the FIFO device to the child, e.g., in a global variable (you can use the parent's $ZJOB, which is the pid of the child, to create a unique index, or you can use the parent's pid which the child can get from its /proc/$JOB/stat).
2. Instead of the JOB command, have the child be a process spawned by inetd/xinetd in response to a connection attempt at a TCP port. The parent talks to a socket device, the child communicates with its $PRINCIPAL.
Regards
-- Bhaskar