mirror of
https://github.com/janet-lang/janet
synced 2025-09-02 02:48:05 +00:00
Allow iterating over generators with pairs, keys, and values.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
(defn action []
|
||||
(print "Handled SIGHUP!")
|
||||
(flush))
|
||||
(print "cleanup")
|
||||
(os/exit 1))
|
||||
|
||||
(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)
|
||||
(os/sigaction :term action true)
|
||||
(os/sigaction :int action true)
|
||||
(forever))
|
||||
|
Reference in New Issue
Block a user