Skip to content

Avoid ncs receiving ctrl-c

Kristian Larsson requested to merge 52-ctrl-c into master

Enable job control monitor mode, which is disabled per default for non-interactive shells, so that ncs is actually started as a background process, that is, running in a separate process group.

When ctrl-c is pressed in, SIGINT is delivered to all the processes in the foreground process group, which would previously include ncs. ncs is really the Erlang BEAM VM (just renamed) and it doesn't handle ctrl-c in a good way - it just shuts breaks the VM immediately, giving ncs no chance to gracefully write database files etc before exiting. By now having it as a background process in a separate process group, we avoid ncs receiving SIGINT and breaking things!

Closes #52 (closed)

Merge request reports