~ chicken-core (chicken-5) 264cc652babc38e492a3868f9d0c3523e8e3daa9
commit 264cc652babc38e492a3868f9d0c3523e8e3daa9
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Sat Mar 11 15:40:40 2017 +1300
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun Mar 12 16:44:03 2017 +0100
Add chicken.process-context module
Like the other modules in posix.scm, this just reexports identifiers
from the "chicken" and "chicken.posix" modules.
Also, add `executable-pathname` to chicken.import.scm, to which it had
never been added (so it was available implicitly at the toplevel but
totally inaccessible from within a module).
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/README b/README
index 573384a1..9d1c1374 100644
--- a/README
+++ b/README
@@ -303,6 +303,7 @@
| | |-- chicken.pretty-print.import.so
| | |-- chicken.process.import.so
| | |-- chicken.process.signal.import.so
+ | | |-- chicken.process-context.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 97bc167b..cad0b00a 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -73,6 +73,7 @@
"chicken.pretty-print.import.so"
"chicken.process.import.so"
"chicken.process.signal.import.so"
+ "chicken.process-context.import.so"
"chicken.random.import.so"
"chicken.repl.import.so"
"chicken.read-syntax.import.so"
diff --git a/chicken.import.scm b/chicken.import.scm
index 004f9725..befdca77 100644
--- a/chicken.import.scm
+++ b/chicken.import.scm
@@ -62,6 +62,7 @@
exact-integer?
exact-integer-sqrt
exact-integer-nth-root
+ executable-pathname
exit
exit-handler
(expand . chicken.expand#expand)
diff --git a/defaults.make b/defaults.make
index 607d0849..37f69a37 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 \
- process.signal random time time.posix
+ process.signal process-context 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 f3932e61..43d058a8 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -320,6 +320,8 @@ chicken.process.import.scm
chicken.process.import.c
chicken.process.signal.import.scm
chicken.process.signal.import.c
+chicken.process-context.import.scm
+chicken.process-context.import.c
chicken.random.import.scm
chicken.random.import.c
chicken.read-syntax.import.scm
diff --git a/posix.scm b/posix.scm
index 39eeb556..e3b2b189 100644
--- a/posix.scm
+++ b/posix.scm
@@ -156,3 +156,14 @@
signal/tstp signal/urg signal/usr1 signal/usr2 signal/vtalrm
signal/winch signal/xcpu signal/xfsz set-alarm!)
(import chicken chicken.posix))
+
+(module chicken.process-context
+ (command-line-arguments argv get-environment-variable
+ get-environment-variables set-environment-variable!
+ unset-environment-variable! emergency-exit exit on-exit
+ executable-pathname program-name current-directory
+ set-root-directory! current-effective-group-id
+ current-effective-user-id current-group-id current-process-id
+ current-user-id parent-process-id current-user-name
+ current-effective-user-name user-information)
+(import chicken chicken.posix))
diff --git a/rules.make b/rules.make
index cfdde464..acd8bf37 100644
--- a/rules.make
+++ b/rules.make
@@ -805,6 +805,7 @@ posixunix.c: $(SRCDIR)posix.scm $(SRCDIR)posixunix.scm $(SRCDIR)posix-common.scm
-emit-import-library chicken.time.posix \
-emit-import-library chicken.process \
-emit-import-library chicken.process.signal \
+ -emit-import-library chicken.process-context \
-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 \
@@ -813,6 +814,7 @@ posixwin.c: $(SRCDIR)posix.scm $(SRCDIR)posixwin.scm $(SRCDIR)posix-common.scm $
-emit-import-library chicken.time.posix \
-emit-import-library chicken.process \
-emit-import-library chicken.process.signal \
+ -emit-import-library chicken.process-context \
-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.irregex
Trap