Raymond Toy pushed to branch rtoy-fix-49-clm-crash at cmucl / cmucl
Commits:
-
87c07e5d
by Raymond Toy at 2018-01-27T18:19:56-08:00
1 changed file:
Changes:
... | ... | @@ -522,8 +522,18 @@ |
522 | 522 |
;; Make sure all the args are okay.
|
523 | 523 |
(unless (every #'simple-string-p args)
|
524 | 524 |
(error (intl:gettext "All args to program must be simple strings -- ~S.") args))
|
525 |
+ |
|
526 |
+ ;; Make sure program is a string that we can use with spawn.
|
|
527 |
+ (setf program
|
|
528 |
+ (if (pathnamep program)
|
|
529 |
+ (lisp::with-pathname (p program)
|
|
530 |
+ (or (unix::unix-namestring p)
|
|
531 |
+ (namestring p)))
|
|
532 |
+ (namestring program)))
|
|
533 |
+ (check-type program string)
|
|
534 |
+ |
|
525 | 535 |
;; Prepend the program to the argument list.
|
526 |
- (push (namestring program) args)
|
|
536 |
+ (push program args)
|
|
527 | 537 |
;; Clear random specials used by GET-DESCRIPTOR-FOR to communicate cleanup
|
528 | 538 |
;; info. Also, establish proc at this level so we can return it.
|
529 | 539 |
(let (*close-on-error* *close-in-parent* *handlers-installed* proc)
|
... | ... | @@ -566,10 +576,10 @@ |
566 | 576 |
(cdr entry)))
|
567 | 577 |
env))
|
568 | 578 |
(let ((child-pid
|
569 |
- (without-gcing
|
|
570 |
- (spawn (unix::unix-namestring program)
|
|
571 |
- argv envp pty-name
|
|
572 |
- stdin stdout stderr))))
|
|
579 |
+ (without-gcing
|
|
580 |
+ (spawn program
|
|
581 |
+ argv envp pty-name
|
|
582 |
+ stdin stdout stderr))))
|
|
573 | 583 |
(when (< child-pid 0)
|
574 | 584 |
(error (intl:gettext "Could not fork child process: ~A")
|
575 | 585 |
(unix:get-unix-error-msg)))
|