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.
The resource manager has _PPF_SERVER set, but does not have
_PPF_INFORM set. I have tried removing _PPF_SERVER but it makes
no difference.
Anyone with a good memory recall anything like this ? I have included the
original posting by Malcom Watts from 1994 (which was never answered
according to google).
---- SNIP --------------------------------------------------------
- Interesting problem; whilst testing a code module recently,
I filled a .ini file with invalid file names, incorrectly
formatted sections, and so on, to push the error handling.
The module I’m testing reads a list of processes (file)
names to be spawned from the ini file, then spawns them.
The module runs at prio 20, and reads prio for its progeny from
the ini file. All children are currently spawned at prio 11.
Strange results when spawning using filenames which don’t
exist. My PC slows almost to lockup; the proc manager seems to
spawn a process creation thread, which runs at some obscene
priority (sin shows a “zombie” process ‘running’ at 24) and all of
my lower-prio process are locked out (even ksh running at 29
responds to the keyboard but ‘sin’ doesn’t return for ages). (??)
This happens for 30 seconds, then the spawn fails with a file-not
-found type of error message (as expected), and all is well.
(Zombie process has disappeared).
Problem: I’ve got time-dependent processes running here, and I can’t
wait 30 seconds for proc to decide that a file doesn’t exist,
whilst running at prio 24. Can anyone suggest what I might be
doing wrong here ? Can anyone explain exactly what proc is
doing, wandering off for 30 seconds and effectively starving
other processes ? I thought it might be net-related, given the
30-sec timeout. I could test for existence of the file before
spwaning (and I will) but I want to know what the heck proc is
doing, so it doesn’t bite me later.