Changeset 15494


Ignore:
Timestamp:
Nov 10, 2012, 8:45:28 AM (7 years ago)
Author:
gb
Message:

SIGNAL-EXTERNAL-PROCESS now takes an :ERROR-IF-EXITED keyword
argument. If attempting to signal the process fails because the PID
has already exited and ERROR-IF-EXITED is false, returns NIL rather
than signaling an error. ERROR-IF-EXITED defaults to T (which is
backwards-compatible with traditional behavior); whether this case is
treated as an error or quietly ignored depends on application context.

Fixes ticket:1015 in the trunk; this change should be documented.

File:
1 edited

Legend:

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

    r15398 r15494  
    15571557                           t))))))
    15581558 
    1559   (defun signal-external-process (proc signal)
     1559  (defun signal-external-process (proc signal &key (error-if-exited t))
    15601560    "Send the specified signal to the specified external process.  (Typically,
    15611561it would only be useful to call this function if the EXTERNAL-PROCESS was
     
    15671567        (let ((error (int-errno-call (#_kill pid signal))))
    15681568          (or (eql error 0)
    1569               (%errno-disp error))))))
     1569              (unless (and (eql error (- #$ESRCH))
     1570                           (not error-if-exited))
     1571                (%errno-disp error)))))))
    15701572
    15711573  )                                     ; #-windows-target (progn
Note: See TracChangeset for help on using the changeset viewer.