fork of unix-signals
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
haskal 489c561386 fix library install path issues 2 weeks ago
unix-signals fix library install path issues 2 weeks ago
.gitignore README and licence 4 years ago
.travis.yml Support Racket on Chez Scheme 1 year ago
COPYING README and licence 4 years ago
Makefile Initial commit 4 years ago
README.md Tweak to example 4 years ago
gpl.txt README and licence 4 years ago
info.rkt Support Racket on Chez Scheme 1 year ago
lgpl.txt README and licence 4 years ago

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/.