[Openmcl-devel] Trouble killing a processes
Daniel Weinreb
dlw at itasoftware.com
Wed Oct 27 08:57:36 PDT 2010
Since I am having some issues with process killing,
I tried this, including running it many times.
(I had to add "ccl:" in a few places.) It works
fine with the release I'm using, 14324.
-- Dan
Michael Minerva wrote:
> Hey all,
>
> I have been having trouble killing a process in the application that I
> am currently working on, so I decided to make a simpler example using
> just basic ccl methods, and I experience the same problem. I was
> wondering if anyone could help me understand what is going on. My
> little program just makes a process which just prints to the console
> then sleeps in a loop, then I assign this process to a local variable,
> then I kill the process and print it out. Often times, even after I
> have issues the command process-kill to the reference to the process,
> the process continues printing. Sometimes when I print the process
> after killing it, it says it is still active, sometimes it s says it
> is exhausted and sometimes it says it is reset. According to the
> documentation I found about this method it is supposed to "Causes a
> specified process to cleanly exit from any ongoing computation, and
> then exit.". Can anyone help me understand why this is not happening?
> Here is my example program. If you try it out make sure to run it
> many times because it will often work correctly on the first try.
> Also, when you see the behavior I have been experiencing you will
> need to quit ccl to end the process.
>
> (defun make-a-process()
> (process-run-function
> '(:name "my-process" :priority 1)
> #'(lambda ()
> (loop
> (print "doing process things.")
> (print *current-process*)
> (sleep .01)))))
>
> (defun process-test ()
> (let ((my-process
> (make-a-process)))
> (print "kill process")
> (process-kill my-process)
> (print *current-process*)
> (print "after kill")
> (print my-process)
> nil))
>
> (process-test)
> ------------------------------------------------------------------------
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20101027/a636b343/attachment.htm>
More information about the Openmcl-devel
mailing list