Consultor Eletrônico



Kbase 19830: prowin32 process continues to run after all visible windows are closed.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/15/2011
Status: Verified

SYMPTOM(s):

prowin32 process continues to run after all visible windows are closed

When application is run from the command line or from an icon, prowin32 process continues to run after application terminates.

When running from the UIB or AppBuilder, the stop button remains enabled after the application is closed.

prowin32 process continues running when windows are closed out of order.

FACT(s) (Environment):

May occur when windows have a parent-child relationship.
May occur when spawned windows are not run persistently.
Suppress Window attribute is not checked in the UIB or AppBuilder.
Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x

CAUSE:

This problem occurs because more than one WAIT-FOR is active at a time.

FIX:

If the windows have a parent-child relationship, create a trigger in the child window for the "PARENT-WINDOW-CLOSE" event containing the following code:

APPLY "CLOSE" TO THIS-PROCEDURE.
QUIT.
When the parent window is closed, this event will be fired and the process will also be released.
If there is no parent-child relationship between the windows, all windows other than the main window should be run persistently so that they can be manipulated using their handles from the windows that call them. For example:

DEFINE VARIABLE h_child AS HANDLE NO-UNDO.
RUN child.w PERSISTENT SET h_child.
Then the child window can be closed from its parent with:

IF VALID-HANDLE(h_child) THEN
DO:
APPLY "CLOSE" TO h_child.
h_child = ?.
END.