Commit c30201c 1 parent f41a61f commit c30201c Copy full SHA for c30201c
File tree 4 files changed +20
-23
lines changed
4 files changed +20
-23
lines changed Original file line number Diff line number Diff line change
1
+ (define unwind #f)
2
+
3
+ ((call/cc
4
+ (lambda (k )
5
+ (set! unwind k)
6
+ (lambda () #f))))
1
7
2
8
(cond-expand
3
9
(plan9
4
- (define (exit . o )
10
+ (define (emergency- exit . o )
5
11
(%exit (if (pair? o)
6
12
(if (string? (car o))
7
13
(car o)
8
14
(if (eq? #t (car o)) " " " chibi error" ))
9
15
" " ))))
10
16
(else
11
- (define (exit . o )
17
+ (define (emergency- exit . o )
12
18
(%exit (if (pair? o)
13
19
(if (integer? (car o))
14
20
(inexact->exact (car o))
15
21
(if (eq? #t (car o)) 0 1 ))
16
22
0 )))))
17
23
24
+ (define (exit . o )
25
+ (unwind (lambda () (apply emergency-exit o))))
26
+
18
27
(cond-expand
19
28
(bsd
20
29
(define (process-command-line pid )
Original file line number Diff line number Diff line change 1
1
2
2
(define-library (chibi process)
3
- (export exit sleep alarm %fork fork kill execute waitpid system system?
4
- process-command-line process-running?
3
+ (export exit emergency-exit sleep alarm
4
+ %fork fork kill execute waitpid system system?
5
+ process-command-line process-running?
5
6
set-signal-action! make-signal-set
6
7
signal-set? signal-set-contains?
7
8
signal-set-fill! signal-set-add! signal-set-delete!
Original file line number Diff line number Diff line change 1
1
(define-library (chibi win32 process-win32)
2
2
(import (scheme base))
3
- (export exit)
3
+ (export exit emergency-exit )
4
4
(cond-expand
5
5
(windows
6
6
(include-shared " process-win32" )
7
7
(include " process-win32.scm" ))
8
8
(else
9
- (import (only (chibi process) exit)))))
9
+ (import (only (chibi process) exit emergency-exit )))))
Original file line number Diff line number Diff line change 1
1
2
2
(define-library (scheme process-context)
3
- (import (chibi) (only (scheme base) call/cc) ( srfi 98 ))
4
- (cond-expand (windows (import (prefix ( only (chibi win32 process-win32) exit) process- )))
5
- (else (import (prefix ( only (chibi process) exit) process- ))))
3
+ (import (chibi) (srfi 98 ))
4
+ (cond-expand (windows (import (only (chibi win32 process-win32) exit emergency-exit )))
5
+ (else (import (only (chibi process) exit emergency-exit ))))
6
6
(export get-environment-variable get-environment-variables
7
- command-line exit emergency-exit)
8
-
9
- (begin
10
- (define unwind #f)
11
-
12
- ((call/cc
13
- (lambda (cont )
14
- (set! unwind cont)
15
- (lambda () #f))))
16
-
17
- (define emergency-exit process-exit)
18
-
19
- (define (exit . rest )
20
- (unwind (lambda () (apply emergency-exit rest))))))
7
+ command-line exit emergency-exit))
You can’t perform that action at this time.
0 commit comments