gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] vkill.el


From: Joe Corneli
Subject: [patch] vkill.el
Date: Thu, 06 May 2004 22:35:22 -0500

>From the original file,

http://www.splode.com/~friedman/software/emacs-lisp/src/vkill.el

we have a description of what vkill.el is supposed to do:

;;; vkill.el --- view and kill Unix processes from within Emacs

The following patch was necessary to get the software to work on my
system (Mac OS X 10.3/Fink/Emacs CVS).  I don't know if it is
working for others as-is, but I guess I'd be surprised if it was,
since the function that actually runs the kill process didn't
seem to do good things in Emacs.

The maintainers may want to take a closer look. Anyone running
another operating system may see different results. The patch shows
the places where tweaking may be required.

The licensing terms for vkill.el are as follows:

;; Verbatim copies of this file may be freely redistributed.
;;
;; Modified versions of this file may be redistributed provided that
;; this notice remains unchanged, the file contains prominent notice
;; of author and time of modifications, and redistribution of the
;; file is not further restricted in any way.
;;
;; This file is distributed `as is', without warranties of any kind.

I believe I have adhered to that.

diff -c /Users/arided/vkill-orig.el /Users/arided/vkill.el
*** /Users/arided/vkill-orig.el Thu May  6 22:12:27 2004
--- /Users/arided/vkill.el      Thu May  6 22:18:54 2004
***************
*** 33,38 ****
--- 33,44 ----
  
  ;;; ChangeLog:
  
+ ;; 2004-05-06  Joe Corneli  <address@hidden>
+ ;;
+ ;;      * vkill.el (vkill-ps-command): Made less verbose. This could 
+ ;;      be an option... change further if you like.
+ ;;;     (vkill-send-signal): made this command work!
+ 
  ;; 2002-03-20  Noah Friedman  <address@hidden>
  ;;
  ;;    * vkill.el (vkill-ps-command): Convert user-uid to string for concat.
***************
*** 101,113 ****
  ;(setq vkill-ps-command (concat "ps -wwwfu " (number-to-string (user-uid))))
  (defvar vkill-ps-command
    (cond ((memq system-type '(berkeley-unix netbsd))
!          "ps -uxgww")
          ((memq system-type '(linux lignux gnu/linux))
           ;; Alternate SYSV style
           ;;(concat "ps -wwwfu " (number-to-string (user-uid)))
!          "ps uxwww")
          (t
!          (concat "ps -fu " (number-to-string (user-uid)))))
    "*Command used to get list of processes owned by the current user.
  Arguments to the \"ps\" command differ under various operating
  systems.")
--- 107,121 ----
  ;(setq vkill-ps-command (concat "ps -wwwfu " (number-to-string (user-uid))))
  (defvar vkill-ps-command
    (cond ((memq system-type '(berkeley-unix netbsd))
!          "ps -xgww")
          ((memq system-type '(linux lignux gnu/linux))
           ;; Alternate SYSV style
           ;;(concat "ps -wwwfu " (number-to-string (user-uid)))
!          "ps xwww")
          (t
!          ;; I don't like the verbose -u option
!          ;;;(concat "ps -u " (number-to-string (user-uid)))
!          "ps"))
    "*Command used to get list of processes owned by the current user.
  Arguments to the \"ps\" command differ under various operating
  systems.")
***************
*** 341,348 ****
        (goto-char (point-min))
        (if (not (looking-at "^\\* "))
            (error "No processes marked"))
!       (while (re-search-forward "^\\*\\s-+\\S-+\\s-+\\([0-9]+\\).*\n" nil t)
!         (replace-match " \\1" t nil))
        (goto-char (point-min))
        (insert "kill -" (if (numberp signal) (int-to-string signal) signal))
        (call-process shell-file-name nil 0 nil "-c" (buffer-string)))
--- 349,356 ----
        (goto-char (point-min))
        (if (not (looking-at "^\\* "))
            (error "No processes marked"))
!       (while (re-search-forward "^\\*\\s-+\\([0-9]+\\).*" nil t)
!         (replace-match " \\1 \\\\" t nil))
        (goto-char (point-min))
        (insert "kill -" (if (numberp signal) (int-to-string signal) signal))
        (call-process shell-file-name nil 0 nil "-c" (buffer-string)))

Diff finished.  Thu May  6 22:19:01 2004




reply via email to

[Prev in Thread] Current Thread [Next in Thread]