-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
(define-library (chibi win32 process-win32) | ||
(import (scheme base)) | ||
(export exit) | ||
(export exit emergency-exit) | ||
(cond-expand | ||
(windows | ||
(include-shared "process-win32") | ||
(include "process-win32.scm")) | ||
(else | ||
(import (only (chibi process) exit))))) | ||
(import (only (chibi process) exit emergency-exit))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
|
||
(define-library (scheme process-context) | ||
(import (chibi) (only (scheme base) call/cc) (srfi 98)) | ||
(cond-expand (windows (import (prefix (only (chibi win32 process-win32) exit) process-))) | ||
(else (import (prefix (only (chibi process) exit) process-)))) | ||
(import (chibi) (srfi 98)) | ||
(cond-expand (windows (import (only (chibi win32 process-win32) exit emergency-exit))) | ||
(else (import (only (chibi process) exit emergency-exit)))) | ||
(export get-environment-variable get-environment-variables | ||
command-line exit emergency-exit) | ||
|
||
(begin | ||
(define unwind #f) | ||
|
||
((call/cc | ||
(lambda (cont) | ||
(set! unwind cont) | ||
(lambda () #f)))) | ||
|
||
(define emergency-exit process-exit) | ||
|
||
(define (exit . rest) | ||
(unwind (lambda () (apply emergency-exit rest)))))) | ||
command-line exit emergency-exit)) |