Commit b3622011 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Add clasp support to launch-program

parent 8e33c55c
......@@ -392,13 +392,14 @@ to ignore if URGENT is T. On some platforms, it may also be subject to
race conditions."
(declare (ignorable urgent))
#+abcl (sys:process-kill (slot-value process-info 'process))
#+clasp (mp:process-kill (slot-value process-info 'process))
  • Are you certain that this change is correct? Because other CL implementations that provide an mp:process-kill use that in the multiprocessing sense (indeed, what does the mp prefix here stand for if not that?). This function e.g.:

    is not the right function to interact with asynchronous processes while this one is:

    Edited by Elias Pipping
  • I "just" applied a patch sent by the CLASP authors. It may or may not be appropriate, indeed. Will you forward the question to them? Shall I?

  • Well I strongly believe that the patch is wrong. The way I recall it, there is essentially no support for asynchronous process spawning in clasp, and indeed run-program just always calls ext:system, the simplest and least useful of all the possible synchronous interfaces. So the patch could only make sense if things had changed dramatically: If all of a sudden there was asynchronous process spawning support.

    But even then the patch makes no sense because while it adds a way to terminate a process (a process-info object, actually), it provides no way to create one (and we can expect that no one will construct a process-info object other than through uiop).

    So my impression is that the person who wrote the patch misunderstood the purpose of terminate-process. Why he/she chose to write this patch (to what end, and how he/she became aware of the fact that such a function exists and does not support clasp) or what he/she tested it on, I do not know.

    If you could reach out to him/her, I'd appreciate that. A pointer to our discussion here should be enough.

    Edited by Elias Pipping
Please register or sign in to reply
;; On ECL, this will only work on versions later than 2016-09-06,
;; but we still want to compile on earlier versions, so we use symbol-call
#+ecl (symbol-call :ext :terminate-process (slot-value process-info 'process) urgent)
#+lispworks7+ (sys:pipe-kill-process (slot-value process-info 'process))
#+mkcl (mk-ext:terminate-process (slot-value process-info 'process)
:force urgent)
#-(or abcl ecl lispworks7+ mkcl)
#-(or abcl clasp ecl lispworks7+ mkcl)
((os-unix-p) (%posix-send-signal process-info (if urgent 9 15)))
((os-windows-p) (if-let (pid (process-info-pid process-info))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment