← Back to team overview

kicad-developers team mailing list archive

Re: executing child processes

 

As part of improving the STEP Export code to protect KiCad
from a hung child process and also to give the use the option
to cancel a long Export operation, I am doing some preliminary
design work on a dialog for launching such child processes.
My ideas so far:

1. Define a dialog which will:
 a. take a command line and optional environment pointer
 b. on ShowModal()  (+ override Show() to use ShowModal/EndModal),
    execute the command argument asynchronously
 c. display the command being executed and its parameters
 d. display the stdout + stderr messages from the child process
 e. offer a CANCEL and OK button; OK is grayed out
    until the process terminates, while CANCEL is active
    until the process terminates and clicking CANCEL will kill
    the child process.

This dialog essentially provides synchronous execution of the
command while making it possible to (a) cancel the process,
and (b) see the stdout + stderr output which may not otherwise
be accessible to the user. The dialog may be of some use in
other cases where we have synchronous execution such as
the BOM export.

Any comments or suggestions, including other synchronous
child processes I may have missed?

- Cirilo


Follow ups