home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / 3177 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.7 KB  |  65 lines

  1. Newsgroups: comp.lang.lisp
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!rpi!batcomputer!cornell!raman
  3. From: raman@cs.cornell.edu (T. V. Raman)
  4. Subject: Trying to understand processes under lucid:
  5. Message-ID: <1993Jan5.195039.8245@cs.cornell.edu>
  6. Summary: Processes survive even after  killing?
  7. Keywords: make-process kill-process survingsurviving processes
  8. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  9. Date: Tue, 5 Jan 1993 19:50:39 GMT
  10. Lines: 53
  11.  
  12.  
  13.  
  14. Hi!
  15.  
  16. I am trying to understand how multitasking works under Lucid Common
  17. Lisp and am not getting very far.
  18.  
  19. After reading through the manual I tried:
  20.  
  21. (setf *p1 
  22.   (make-process :name "play"
  23.                 :function #'(lambda(filename) (loop 
  24.                               (when *continue*
  25.                                 (play filename ))))
  26.                 :args (list *beep* )))
  27.  
  28. play is a simple function which does:
  29.  
  30. (shell
  31. (concatenate 'string
  32. "play -v 1 -h "
  33. file ))
  34.  
  35. and *continue* is a global variable.
  36.  
  37. Now when I evaluate the above setf form and then set *continue* to T
  38. lisp starts playing the sound file that *beep* points to.
  39.  
  40. If I toggle the variable *continue* the sound stops, resumes if I
  41. toggle again.
  42.  
  43. All this is as expected.
  44.  
  45. However if I do
  46. (kill-process *p1 )
  47.  
  48. and then do (process-state *p1)
  49. it shows up as :killed,
  50. but now here's the surprising thing:
  51. setting *continue* to T resumes the playing of the sound.
  52.  
  53. So what's playing the sound if the process *p1 has been killed?
  54.  
  55. And how do I get rid of *p1 entirely?
  56.  
  57. Thanks,
  58.  
  59. --Raman
  60. -- 
  61.    T. V. Raman <raman@cs.cornell.edu>Tel: (607)255-9202  R 272-3649
  62.                        Office: 4116 Upson Hall,
  63. Department of Computer Science, Cornell University Ithaca NY 14853-6201
  64.                 Res: 226 Bryant Avenue Ithaca NY 14850
  65.