Example-1:
tk_messageBox -message "before"
exec -- [auto_execok cmd] << {
notepad
sleep 5
} &
tk_messageBox -message "after"
With example-1, everything works as expected:
- the start message appears - it has to be confirmed
- notepad starts (this by itself is an asynchron process)
- sleep starts (because thats a console mode program, a separate console window appears)
- the stop message appears immediately (because the whole cmd is started in background with &)
- after 5 seconds sleep ends
- notepad is still running
The main window of the tk prog stays responsive all the time.-
Example-2:
tk_messageBox -message "before"
exec -- [auto_execok cmd] << {
notepad
sleep 5
}
tk_messageBox -message "after"
With example-2, things are slightly different:
- the start message appears - it has to be confirmed
- notepad starts
- sleep starts
- the stop message appears immediately (because the whole cmd is started in background with &)
- after 5 seconds sleep ends
- notepad is still running
- The main window of the tk prog stays responsive all the time.-