skratchdot / open-golang

Open a file, directory, or URI using the OS's default application for that object type. Optionally, you can specify an application to use.
MIT License
783 stars 65 forks source link

feat: add wait for windows start cmd #35

Open heidingeww opened 1 year ago

heidingeww commented 1 year ago

Open waits for the open command to complete. In reality, that means to wait for the open command to complete and not what it opens. The open command is using run32dll and when that completes, the app can still be running. It causes a race condition.

My fix with start /wait filename will fix this.