Megatest

Check-in [b4a4de8e9e]
Login
Overview
Comment:Removed exit from on-exit call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60 | v1.6014a
Files: files | file ages | folders
SHA1: b4a4de8e9e77aad4185a9b693cce197a8c451753
User & Date: mrwellan on 2015-05-27 11:40:28
Other Links: branch diff | manifest | tags
Context
2015-06-02
22:31
merged check-in: 902972c7ce user: matt tags: multi-area
2015-05-28
00:18
Corrected exit delays, added attempted repair on discovering a corrupted db check-in: d125f9632a user: matt tags: v1.60
2015-05-27
11:40
Removed exit from on-exit call. check-in: b4a4de8e9e user: mrwellan tags: v1.60, v1.6014a
05:36
More cleanup on exit handling. Exit on ^Z check-in: 824cbc749e user: matt tags: v1.60
Changes

Modified common.scm from [6b238a264b] to [9be5018f3c].

20
21
22
23
24
25
26







27
28
29
30
31
32
33
(declare (unit common))

(include "common_records.scm")

;; (require-library margs)
;; (include "margs.scm")








(define getenv get-environment-variable)
(define (safe-setenv key val)
  (if (and (string? val)(string? key))
      (handle-exceptions
       exn
       (debug:print 0 "ERROR: bad value for setenv, key=" key ", value=" val)
       (setenv key val))







>
>
>
>
>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(declare (unit common))

(include "common_records.scm")

;; (require-library margs)
;; (include "margs.scm")

;; (define old-exit exit)
;; 
;; (define (exit . code)
;;   (if (null? code)
;;       (old-exit)
;;       (old-exit code)))

(define getenv get-environment-variable)
(define (safe-setenv key val)
  (if (and (string? val)(string? key))
      (handle-exceptions
       exn
       (debug:print 0 "ERROR: bad value for setenv, key=" key ", value=" val)
       (setenv key val))
275
276
277
278
279
280
281
282

283
284
285
286
287
288
289
					  (vector-set! *task-db* 0 #f)))))) "Cleanup db exit thread"))
	  (th2 (make-thread (lambda ()
			      (debug:print 4 "Attempting clean exit. Please be patient and wait a few seconds...")
			      (if no-hurry
				  (thread-sleep! 5) ;; give the clean up few seconds to do it's stuff
				  (thread-sleep! 1))
			      (debug:print 0 "       Done.")
			      (exit))

			    "clean exit")))
      (thread-start! th2)
      (thread-start! th1)
      (thread-join! th2))))

(define (std-signal-handler signum)
  ;; (signal-mask! signum)







<
>







282
283
284
285
286
287
288

289
290
291
292
293
294
295
296
					  (vector-set! *task-db* 0 #f)))))) "Cleanup db exit thread"))
	  (th2 (make-thread (lambda ()
			      (debug:print 4 "Attempting clean exit. Please be patient and wait a few seconds...")
			      (if no-hurry
				  (thread-sleep! 5) ;; give the clean up few seconds to do it's stuff
				  (thread-sleep! 1))
			      (debug:print 0 "       Done.")

			      )
			    "clean exit")))
      (thread-start! th2)
      (thread-start! th1)
      (thread-join! th2))))

(define (std-signal-handler signum)
  ;; (signal-mask! signum)