mirror of
https://github.com/janet-lang/janet
synced 2025-01-12 00:20:26 +00:00
11 lines
276 B
Plaintext
11 lines
276 B
Plaintext
|
(defn action []
|
||
|
(print "Handled SIGHUP!")
|
||
|
(flush))
|
||
|
|
||
|
(defn main [_]
|
||
|
# Set the interrupt-interpreter argument to `true` to allow
|
||
|
# interrupting the busy loop `(forever)`. By default, will not
|
||
|
# interrupt the interpreter.
|
||
|
(os/sigaction :hup action true)
|
||
|
(forever))
|