ioi-2023 / contestant-vm

Contestant virtual machine for online IOI (since 2020)
1 stars 2 forks source link

autoinstall: kill HTTP server when exiting #80

Closed pobrn closed 1 year ago

pobrn commented 1 year ago

Otherwise the HTTP server will keep running unnecessarily and prevent running start-autoinstall.sh again because port tcp/8000 will be used.

radl97 commented 1 year ago

Thanks for the PR! I did not know how to do exactly this.

and prevent running start-autoinstall.sh again because port tcp/8000 will be used.

That is not true, because set -e cannot trap for something &, because the child exit is not handled by bash. As I have hoped, it would not check the exit code, and try to kill the shell. I have tested this thoroughly.

Nevertheless, this is a great addition!