nanogui: silkscreen buttons, GrCloseWindows
Subject:
Re: silkscreen buttons, GrCloseWindows
From:
Morten Rolland ####@####.####
Date:
15 Nov 2000 12:36:16 -0000
Message-Id: <3A12841A.289B08E2@screenmedia.no>
CCYau wrote:
> I have used the GrGetWMProperties call to obtained the wid and compare
>to the title it got, successfully close the corresponding windows, by
> GrCloseWindow(wid); however, the process/window I have closed was
> remained in the process list as Z state.... How can I cleanly kill
> a sub-process using Gr Windows function?
The problem with a process in the Z state is that you need to use
the 'wait', 'waitpid' or similar to collect the process' exit value.
A process in the Z state only occupies a slot in the process table,
contining the exit code of the process.
Normally, the shell does this for you, but when you use 'fork' yourself,
you have to do 'wait' as well. If the parent process is dead, it is
the 'init' process that performs the wait to clean up the process table
IIRC.
Regards,
Morten Rolland