fork of unix-signals
Go to file
xenia 489c561386 fix library install path issues 2021-04-04 04:17:39 -04:00
unix-signals fix library install path issues 2021-04-04 04:17:39 -04:00
.gitignore README and licence 2016-09-13 17:16:34 -04:00
.travis.yml Support Racket on Chez Scheme 2020-02-23 18:24:38 -05:00
COPYING README and licence 2016-09-13 17:16:34 -04:00
Makefile Initial commit 2016-09-13 17:07:27 -04:00
README.md Tweak to example 2016-09-13 18:17:57 -04:00
gpl.txt README and licence 2016-09-13 17:16:34 -04:00
info.rkt Support Racket on Chez Scheme 2020-02-23 18:24:38 -05:00
lgpl.txt README and licence 2016-09-13 17:16:34 -04:00

README.md

Unix signal sending and handling for Racket

A small example:

(require unix-signals)

(capture-signal! 'SIGUSR1)
(capture-signal! 'SIGUSR2)
(printf "Try 'kill -USR1 ~a' and 'kill -USR2 ~a'\n" (getpid) (getpid))
(let loop ()
  (define signum (read-signal))
  (printf "Received signal ~v (name ~v)\n" signum (lookup-signal-name signum))
  (loop))

Be warned: Don't try to capture SIGSEGV, SIGBUS or other signals that Racket already treats specially.

Licence

Copyright (c) 2016 Tony Garnock-Jones

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program (see the files "lgpl.txt" and "gpl.txt"). If not, see http://www.gnu.org/licenses/.