280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
(define (std-signal-handler signum)
;; (signal-mask! signum)
(debug:print 0 "ERROR: Received signal " signum " exiting promptly")
;; (std-exit-procedure) ;; shouldn't need this since we are exiting and it will be called anyway
(exit))
(set-signal-handler! signal/int std-signal-handler) ;; ^C
;; (set-signal-handler! signal/term std-signal-handler)
;;======================================================================
;; Misc utils
;;======================================================================
;; Convert strings like "5s 2h 3m" => 60x60x2 + 3x60 + 5
(define (common:hms-string->seconds tstr)
|
|
|
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
(define (std-signal-handler signum)
;; (signal-mask! signum)
(debug:print 0 "ERROR: Received signal " signum " exiting promptly")
;; (std-exit-procedure) ;; shouldn't need this since we are exiting and it will be called anyway
(exit))
(set-signal-handler! signal/int std-signal-handler) ;; ^C
(set-signal-handler! signal/term std-signal-handler)
;;======================================================================
;; Misc utils
;;======================================================================
;; Convert strings like "5s 2h 3m" => 60x60x2 + 3x60 + 5
(define (common:hms-string->seconds tstr)
|