File: kill.py

package info (click to toggle)
gnome-shell-extension-desktop-icons-ng 48.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,424 kB
  • sloc: javascript: 8,703; xml: 109; sh: 69; python: 18; makefile: 9
file content (11 lines) | stat: -rwxr-xr-x 297 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3

import subprocess

sp = subprocess.run(['ps', '-ax'], capture_output = True)
for linea in sp.stdout.decode('utf-8').split('\n'):
    if -1 == linea.find("ding.js"):
        continue
    linea = linea.strip();
    pid = linea.split(" ")[0]
    subprocess.run(['kill', pid])