Skip to content

Instantly share code, notes, and snippets.

@snipsnipsnip
Created September 7, 2015 03:49
Show Gist options
  • Save snipsnipsnip/138674f626e0f0394894 to your computer and use it in GitHub Desktop.
Save snipsnipsnip/138674f626e0f0394894 to your computer and use it in GitHub Desktop.
waitpid.bat
@ruby -x "%~f0" %* & exit /b
#!ruby
pid = Integer(ARGV[0]).to_s
while `tasklist.exe /FI "PID eq #{pid}"`.include?(pid)
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment