×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi, my name is Oleg. I am writing RPGLE programm.
Actually, i have been trying to spawn proccesses and then chek their
status but i have problem.
ProcessID = spawn(.....);
PID = waitpid(PID:stat_loc:0);
I use waitpid(PID:stat_loc:0) function to chek status but it always
return stat_loc = *zero but PID = ProcessID.
My code is near below. If anybode could help me - it would be great!!!!
/EJECT
H DFTACTGRP(*NO)
***
D spawn PR extproc('spawn') like(pid_t)
D path * value options(*string)
D fd_count 10I 0 value
D fd_map 10I 0 dim(256) options(*varsize:*omit)
D inherit likeds(inheritance_t)
D argv * dim(4)
D options(*varsize)
D envp * dim(256) options(*varsize)
D waitpid PR extproc('waitpid') like(pid_t)
D pid like(pid_t) value
D stat_locp *
D options 10I 0 value
d stat_p s *
D chkStatus PR
D status 10i 0
d n
d n
d n
d ended s n
d failed s n
d stopped s n
D flagset_t S 10U 0 based(Template)
D pid_t S 10I 0 based(Template)
D sigset_t s 20U 0 based(Template)
D parms s 100A dim(4)
D PgmLib s 100A inz('ALIBDV1')
D PgmName s 100A inz('ChildProc')
D path s 200A varying
D inh ds likeds(inheritance_t)
D argv s * dim(4)
D envp s * dim(256)
D processID s like(pid_t)
D cpid s like(pid_t)
D stat_loc s *
D stat_val s 10I 0 based(PtrStat)
D PtrStat s *
D options s 10I 0
D childStatus s 10i 0
D inheritance_t DS based(Template)
D flags like(flagset_t)
D pgroup like(pid_t)
D sigmask like(sigset_t)
D sigdefault like(sigset_t)
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.