Skip to content

Making Ngrok process survive server stop on Linux

Compare
Choose a tag to compare
@texpert texpert released this 19 Feb 21:33
· 29 commits to main since this release

Making Ngrok process survive server stop on Linux

It was working OK on Mac OS on the 0.1.0 release, but not on Linux.

It came out that Process.setsid should be applied to the spawned process to establish this process as a new session and process group leader. This is completely detaching it from the parent process, so it won't be killed when the parent will go down.

Full Changelog

Merged pull requests:

  • Add config.hosts example for Rails >= 6.0.0 #18 (texpert)
  • Ngrok.start should try to return first @ngrok_url_https or then @ngrok_url #17 (texpert)
  • Use fork, Process.setsid and spawn instead of just spawn, to change the owner of ngrok process #16 (texpert)