~ chicken-core (chicken-5) 17882aaf46261a43246000c0a2e42eff9d55c4f7
commit 17882aaf46261a43246000c0a2e42eff9d55c4f7 Author: Evan Hanson <evhan@foldling.org> AuthorDate: Tue Feb 28 16:54:02 2017 +1300 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Thu Mar 2 21:00:50 2017 +1300 Add chicken.process.signal module Also adds a stub for `signal/bus` on Windows so that the list of signal/* values is the same on both platforms. diff --git a/README b/README index c242fc91..b7c7e480 100644 --- a/README +++ b/README @@ -302,6 +302,7 @@ | | |-- chicken.posix.import.so | | |-- chicken.pretty-print.import.so | | |-- chicken.process.import.so + | | |-- chicken.process.signal.import.so | | |-- chicken.random.import.so | | |-- chicken.repl.import.so | | |-- chicken.read-syntax.import.so diff --git a/chicken-install.scm b/chicken-install.scm index 754c456b..f9f81ba4 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -72,6 +72,7 @@ "chicken.posix.import.so" "chicken.pretty-print.import.so" "chicken.process.import.so" + "chicken.process.signal.import.so" "chicken.random.import.so" "chicken.repl.import.so" "chicken.read-syntax.import.so" diff --git a/defaults.make b/defaults.make index d0e5f18b..1a62e280 100644 --- a/defaults.make +++ b/defaults.make @@ -267,7 +267,7 @@ PRIMITIVE_IMPORT_LIBRARIES = chicken chicken.csi chicken.foreign DYNAMIC_IMPORT_LIBRARIES = setup-api setup-download srfi-4 DYNAMIC_CHICKEN_IMPORT_LIBRARIES = bitwise errno file.posix fixnum flonum \ format gc io keyword locative memory posix pretty-print process \ - random time time.posix + process.signal random time time.posix DYNAMIC_CHICKEN_COMPILER_IMPORT_LIBRARIES = user-pass DYNAMIC_CHICKEN_UNIT_IMPORT_LIBRARIES = continuation data-structures \ eval expand file files internal irregex lolevel pathname port \ diff --git a/distribution/manifest b/distribution/manifest index 5f7e9ed2..fe61831d 100644 --- a/distribution/manifest +++ b/distribution/manifest @@ -319,6 +319,8 @@ chicken.pretty-print.import.scm chicken.pretty-print.import.c chicken.process.import.scm chicken.process.import.c +chicken.process.signal.import.scm +chicken.process.signal.import.c chicken.random.import.scm chicken.random.import.c chicken.read-syntax.import.scm diff --git a/posix.scm b/posix.scm index d403c3d4..39eeb556 100644 --- a/posix.scm +++ b/posix.scm @@ -146,3 +146,13 @@ (string delim) (apply string-append escaped-parts) (string delim))))) + +(module chicken.process.signal + (set-signal-handler! set-signal-mask! signal-handler signal-mask + signal-mask! signal-masked? signal-unmask! signal/abrt signal/alrm + signal/break signal/bus signal/chld signal/cont signal/fpe signal/hup + signal/ill signal/int signal/io signal/kill signal/pipe signal/prof + signal/quit signal/segv signal/stop signal/term signal/trap + signal/tstp signal/urg signal/usr1 signal/usr2 signal/vtalrm + signal/winch signal/xcpu signal/xfsz set-alarm!) +(import chicken chicken.posix)) diff --git a/posixwin.scm b/posixwin.scm index c42b5f6e..7a10a707 100644 --- a/posixwin.scm +++ b/posixwin.scm @@ -659,7 +659,7 @@ EOF set-signal-handler! set-signal-mask! signal-handler signal-mask signal-mask! signal-masked? signal-unmask! signal/abrt signal/alrm signal/break signal/chld signal/cont signal/fpe - #;signal/bus signal/hup signal/ill signal/int signal/io signal/kill + signal/bus signal/hup signal/ill signal/int signal/io signal/kill signal/pipe signal/prof signal/quit signal/segv signal/stop signal/term signal/trap signal/tstp signal/urg signal/usr1 signal/usr2 signal/vtalrm signal/winch signal/xcpu signal/xfsz @@ -961,6 +961,7 @@ EOF (define signal/abrt _sigabrt) (define signal/break _sigbreak) (define signal/alrm 0) +(define signal/bus 0) (define signal/chld 0) (define signal/cont 0) (define signal/hup 0) diff --git a/rules.make b/rules.make index ba99cb6e..5462cf90 100644 --- a/rules.make +++ b/rules.make @@ -523,6 +523,7 @@ $(eval $(call declare-emitted-import-lib-dependency,chicken.errno,$(POSIXFILE))) $(eval $(call declare-emitted-import-lib-dependency,chicken.file.posix,$(POSIXFILE))) $(eval $(call declare-emitted-import-lib-dependency,chicken.time.posix,$(POSIXFILE))) $(eval $(call declare-emitted-import-lib-dependency,chicken.process,$(POSIXFILE))) +$(eval $(call declare-emitted-import-lib-dependency,chicken.process.signal,$(POSIXFILE))) $(eval $(call declare-emitted-import-lib-dependency,chicken.bitwise,library)) $(eval $(call declare-emitted-import-lib-dependency,chicken.fixnum,library)) $(eval $(call declare-emitted-import-lib-dependency,chicken.flonum,library)) @@ -813,6 +814,7 @@ posixunix.c: $(SRCDIR)posix.scm $(SRCDIR)posixunix.scm $(SRCDIR)posix-common.scm -emit-import-library chicken.file.posix \ -emit-import-library chicken.time.posix \ -emit-import-library chicken.process \ + -emit-import-library chicken.process.signal \ -emit-import-library chicken.posix posixwin.c: $(SRCDIR)posix.scm $(SRCDIR)posixwin.scm $(SRCDIR)posix-common.scm $(SRCDIR)common-declarations.scm $(bootstrap-lib) -feature platform-windows \ @@ -820,6 +822,7 @@ posixwin.c: $(SRCDIR)posix.scm $(SRCDIR)posixwin.scm $(SRCDIR)posix-common.scm $ -emit-import-library chicken.file.posix \ -emit-import-library chicken.time.posix \ -emit-import-library chicken.process \ + -emit-import-library chicken.process.signal \ -emit-import-library chicken.posix irregex.c: $(SRCDIR)irregex.scm $(SRCDIR)irregex-core.scm $(SRCDIR)irregex-utils.scm $(SRCDIR)common-declarations.scm $(bootstrap-lib) -emit-import-library chicken.irregexTrap