Version 7 of exec on windows oddity?

Updated 2009-06-19 22:07:48 by MHo

Example-1:

         tk_messageBox -message "before"
         exec -- [auto_execok cmd] << {
                 notepad
                 sleep 5
         } &
         tk_messageBox -message "after"

With example-1, everything works as expected:

  1. the start message appears - it has to be confirmed
  2. notepad starts (this by itself is an asynchron process)
  3. sleep starts (because thats a console mode program, a separate console window appears)
  4. the stop message appears immediately (because the whole cmd is started in background with &)
  5. after 5 seconds sleep ends
  6. 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:

  1. the start message appears - it has to be confirmed
  2. notepad starts
  3. sleep starts
  4. the stop message appears immediately (because the whole cmd is started in background with &)
  5. after 5 seconds sleep ends
  6. notepad is still running
  • The main window of the tk prog stays responsive all the time.-

enter categories here