Changeset 8963


Ignore:
Timestamp:
Mar 30, 2008, 9:29:45 AM (11 years ago)
Author:
gb
Message:

Try to detect and report #_fork failure in RUN-PROGRAM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/linux-files.lisp

    r8932 r8963  
    964964                (add-external-process proc)
    965965                (signal-semaphore (external-process-signal proc))
    966                 (monitor-external-process proc)))))
     966                (monitor-external-process proc))
     967               (t
     968                ;; Fork failed
     969                (setf (external-process-%status proc) :error
     970                      (external-process-%exit-code proc) (%get-errno))
     971                (signal-semaphore (external-process-signal proc))))))
    967972   (external-process-args proc)))
    968973
     
    10321037        (with-interrupts-enabled
    10331038            (wait-on-semaphore (external-process-completed proc)))))
    1034     (and (external-process-pid proc) proc)))
     1039    (and (or (external-process-pid proc)
     1040             (if (eq (external-process-%status proc) :error)
     1041               (error "Fork failed in ~s: ~s" proc (%strerror (external-process-%exit-code proc)))))
     1042             (external-process-%status proc)) proc))
    10351043
    10361044
Note: See TracChangeset for help on using the changeset viewer.