Commit 5d5fa7e4 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/js-drone: handle sigint

parent 5c4534cb
......@@ -30,7 +30,7 @@ md5sum = 7d063b33dbdd7548e2a23bc4d8a66a43
[main]
_update_hash_filename_ = drone-scripts/main.js.jinja
md5sum = 7b7073788175c45116bf72dbda4ba044
md5sum = 42b7dd4866c405ea4b3d7384f0d0f6c7
[pubsub]
_update_hash_filename_ = drone-scripts/pubsub.js.jinja
......
......@@ -8,7 +8,7 @@ import {
stopPubsub,
takeOffAndWait
} from {{ json_module.dumps(qjs_wrapper) }};
import { Worker, SIGTERM, setTimeout, signal } from "os";
import { Worker, SIGINT, SIGTERM, setTimeout, signal } from "os";
import { exit, open } from "std";
(function (arm, console, exit, open, scriptArgs, setTimeout, start, stop,
......@@ -53,6 +53,7 @@ import { exit, open } from "std";
}
signal(SIGTERM, exitWorker.bind(null, 0));
signal(SIGINT, exitWorker.bind(null, 0));
function exitOnFail(ret, msg) {
if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment