Kbase P59724: Error 357 under UNIX running code containing OS-COMMAND NO-WAIT value
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Verified
FACT(s) (Environment):
UNIX
SYMPTOM(s):
System error: MAXSUBP: too many subprocesses (357).
Error 357 running 4GL.
Running code that contains OS-COMMAND with NO-WAIT option
Subprocesses are left in <defunct> state.
Subprocesses are owned by the Progress session that generated error 357.
CAUSE:
Progress keeps track of all subprocesses spawned, for exampee via OS-COMMAND NO-WAIT, in a 20-entry table in memory.
The problem is that Progress does not handle correctly the signal that the subprocesses send when they terminate, so this internal table is never cleared up properly.
As a consequence, running OS-COMMAND NO-WAIT 20 times will unconditionally fill up the table, and the 21st time that OS-COMMAND NO-WAIT is executed, error 357 occurs.
The <defunct> subprocesses are a consequence as well of the incorrect signal handling described above.
FIX:
The workaround is to use the SILENT and & sign in the end of the value part of the OS-COMMAND statement to avoid hitting the NO-WAIT issue.
For example:
OS-COMMAND SILENT value ("mbpro <database name> -p <4GL application> | cat &").
If you want to make sure that nothing is output to the screen while the command is executing, replace "| cat" with "> log file", or with "> /dev
ull".