I run the bash script with

exec "/c/program.exe" && echo "ok" 

The script starts the program and freezes - i.e. stops running further.

How can I run the program and continue the execution of the script?

    2 answers 2

    Decision

     exec "/c/program.exe" & echo "ok" 
    • 2
      this option will run program.exe and then issue the "ok" to the console. And if you write like this: (exec "/c/program.exe" && echo "ok") & , then "ok" will be in the console after program.exe has run (if it returns error code == 0) - Zugr
    • Also helpful. Thank. - Skif

    that's about where and what you can stick:

     echo 'before start' ( exec "/c/program.exe" && echo "finished Success" || echo "finished Failure" echo "after finish any case" ) & echo 'after start' 
    • What is the meaning of exec here? - jfs
    • about exec contact the author of the question, I have no idea what kind of Windows it is ;-) - Zugr
    • You should not copy the code from the question if you do not understand what it is doing. The code in question may not work at all. Greater response is expected. Your answer is not only the author of the question can read (in this salt Stack Overflow: one person can share a grain of knowledge with many). Avoid cargo-cult programming - jfs