Lingering processes hang Uniface Anywhere sessions
The Uniface Anywhere architecture allows multiple processes to run within a single session. A minimum of one process must be running at all times. If all processes terminate, the Uniface Anywhere session is closed, all resources are de-allocated, and the client connection is broken.
During the course of normal program execution, most applications will create child processes to perform external operations. Some of these applications, Windows Help for example, provide their own user interface and are closed by the user when no longer needed. Others are helper processes that present no user interface but perform a fixed operation before exiting on their own. Applications also have the option of controlling the child processes they create and terminating them before they exit.
A problem arises in rare cases when a process has no user interface, does not exit on its own, and its parent process does not terminate it directly. Under a default configuration, these processes will create a hung Uniface Anywhere session when all other processes exit. The remaining process keeps the session active, but the client has no user interface to close the session completely.
Registered System Processes
To resolve this issue, the Uniface Anywhere Server supports the registration of certain executables to run as system processes. The Uniface Anywhere session will close if the only processes remaining in the session are system processes.
Warning: The following information involves opening and manipulating the Windows Registry. Carrying out operations other than those described here may cause configuration errors, possibly rendering your system unusable. Please use extreme caution any time you work in the Registry.
To Register an Executable File as one that Creates System Processes
- Run the Registry Editor (regedit.exe)
- Browse to HKEY_LOCAL_MACHINE\Software\Uniface\Uniface Anywhere\Loader\Processes.
- Create a QWORD entry with the name of the executable to be registered (for example, AGENTSVR.EXE).
- Set the value of the new entry to 1 if the full path to the executable is specified, or 2 if only the base name is specified. (Including the full path allows different versions of the same executable image to be run differently.)
- Close the Registry Editor.
This setting affects all current UNIFACE Anywhere sessions in addition to any future sessions. This does not include any sessions already in the "hung" state. Such sessions should be terminated from the Cluster Manager.
For most applications, the default configuration is sufficient. For special cases where a process is created without the means to be terminated, registering the executable of the lingering process will allow Uniface Anywhere sessions to close properly.