Rennie <rallen@csical.com> wrote:
I 've been having an odd problem, and I found this old thread (from
1994) that describes it almost verbatim. The only difference between
my problem and this problem, is that I don’t necessarily need to call
spawn with an invalid filename.
Randomly, Proc will take forever (30 seconds) to spawn a process.
The spawn call returns quickly (P_NOWAIT) but, the system is frozen
(prio 29 shell cannot “sin”). I have a resource manager which
registers a prefix, and spawn()s programs which do an open on the
prefix. When a program dies, I receive a close and do a targetted
wait pid to obtain the status. It works just spiffy most of the
time, but every once in a while there is this long process load.
I’m late to this thread – but I’m just gonna quickly post that
an iomanager/resource manager is not allowed to create children.
Essentially, this could result in a deadlock with Proc, there is
one “thread” in Proc that handles process creation/termination, as
an iomanager, it sends you close messages, if you also send it a
creation message, well, you get that deadlock. There is, also, I think
a timeout on closes, which will kick the termer thread onto the next
one, and 30 seconds sounds about right for that.
Usual solution – create a “starter” agent process that (mostly) stays
REPLY blocked on your iomanager, if you need to start something, Reply()
with the info, it starts the program, then Send()s to you again.
-David
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.