home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / blkos207.zip / SLAUGHTR.CMD < prev    next >
OS/2 REXX Batch file  |  1993-05-26  |  708b  |  37 lines

  1. /*SLAUGHTR.CMD from BLKOS2*/
  2. /*copyright 1992,1993 C>BLACK,B.Stone,KUTEK*/
  3. /*all rights reserved*/
  4.  
  5. call rxfuncadd syssleep,rexxutil,syssleep
  6. '@echo off'
  7. aq=rxqueue("create")
  8. s=rxqueue('set',aq)
  9. 'pstat /c |rxqueue' aq
  10. do until queued()=0
  11. pull kjhg
  12. queue kjhg
  13. parse var kjhg c1 c2 c3 c4 c5
  14. if POS('PSTAT.EXE',c4)\=0 then do
  15. idd=c2;leave;end
  16. end
  17. i=0
  18. do until queued()=0
  19. pull w
  20. parse var w c1 c2 c3 c4 c5 c6 
  21. if datatype(c4,N)\=1&c5\=''&length(c1)=4 then do
  22. if right(c4,11)='PMSHELL.EXE' then iterate
  23. if right(c4,7)='CMD.EXE'&c1=idd then iterate
  24. i=i+1
  25. pid.i=c1
  26. say 'CLOSING' c4
  27. end
  28. end
  29. ss=rxqueue("DELETE",aq)
  30. do j=1 to i
  31. pid.j=X2D(pid.j)
  32. do 3
  33. 'call killem' pid.j
  34. end
  35. end 
  36.  
  37.