this post was submitted on 29 Oct 2024
622 points (94.7% liked)

linuxmemes

21114 readers
1413 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS
     

    Yes yes, I REALLY want to terminate that process and I am very sure about it too, ty.

    (page 2) 46 comments
    sorted by: hot top controversial new old
    [–] [email protected] 18 points 16 hours ago (1 children)

    Typing “kill -9” into a terminal is the equivalent to breaking out the acetylene torch when a nut won’t budge

    [–] [email protected] 12 points 14 hours ago

    Can't be tight if it's liquid

    [–] [email protected] 12 points 17 hours ago

    How the OOM Killer asks a process to terminate:

    indiscriminate spraying

    [–] [email protected] 8 points 16 hours ago (2 children)

    xkill is one of my favorite commands

    [–] [email protected] 1 points 11 hours ago

    Beware the floating X , you don't want to missclick what you're killing lmao

    [–] [email protected] 2 points 13 hours ago (2 children)

    Is there a Wayland equivalent?

    [–] [email protected] 2 points 13 hours ago (1 children)

    I dunno; I sadly can't use Wayland yet bc I have Nvidia

    [–] [email protected] 8 points 13 hours ago* (last edited 13 hours ago) (2 children)

    I don't know if you heard, but the Nvidia issues are solved (mostly).

    The issue most people had was with Explicit Sync, which was patched in the proprietary Nvidia driver 555 which is upstream on most distros.

    [–] [email protected] 1 points 9 hours ago (1 children)

    idk if this could be subjective, but what do you mean by upstream here? Does that mean it’s included in most distros?

    [–] [email protected] 1 points 8 hours ago

    Yep. Most modern distros should be providing the 555 driver by now.

    [–] [email protected] 2 points 13 hours ago

    Good to know; I'll check it out!

    [–] [email protected] 1 points 13 hours ago* (last edited 13 hours ago) (1 children)

    Open the process list in your system monitor of choice, right click, signal, sigkill.

    You can also open a monitor and use top or any variant to detect the process number and manually kill -KILL number

    [–] [email protected] 2 points 13 hours ago (2 children)

    I really want the convenience of binding xkill to a key, which I can use to double tap programs like the undead zombie they've become.

    [–] [email protected] 4 points 13 hours ago (1 children)

    Dunno, create a script that uses a program to get the process number of the current active window or the window the mouse is hovering, and then kill that? Bind that script inor a key with whatever program and voilá.

    It's more involved sure but there's your option.

    [–] [email protected] 2 points 13 hours ago (2 children)

    Great idea, now I just need to know how to do that.

    [–] [email protected] 2 points 10 hours ago

    What's your desktop environment? I'm pretty sure hyperland and sway will give a json output of open Windows.

    You could parse that with jq and pipe it into fzf or dmenu?

    Not quite the same as the clicking but probably just as quick.

    [–] [email protected] 1 points 13 hours ago

    Get learning lol. I know that there's some command line program that gives process info on mouse hover and then that can be parsed with awk to get the pid, then pipe that again into kill -kill. Then use xbindkeys or whatever keybindings program to bind that script to a key.

    Tbh. For involved stuff like this chatgpt will help you more than stackoverflow.

    load more comments (1 replies)
    [–] [email protected] 9 points 17 hours ago* (last edited 17 hours ago) (1 children)

    mainly wrong, by default kill send a SIGTERM, you can try SIGINT or SIGQUIT too, and in the end SIGKILL of course. Same in windows there is different way

    [–] [email protected] 8 points 17 hours ago (3 children)

    I always go straight for the SIGKILL

    [–] [email protected] 3 points 14 hours ago* (last edited 14 hours ago)

    Some software: fork()
    Me: Welcome to the process gauntlet loser, better not hang for a millisecond or you are dead and gone.

    load more comments (2 replies)
    [–] [email protected] 10 points 17 hours ago (1 children)

    TerminateProcess() is pretty reliable, but it doesn't form part of the C signals stack on Windows like kill -9. So for instance, if you're doing process control on Python, you need to use a special Windows-only API to access TerminateProcess().

    [–] [email protected] 1 points 10 hours ago (1 children)

    Never used kill -9. What's the difference between that and taskkill. I usually used taskkill /pid processiwanttokill.exe /f

    [–] [email protected] 2 points 10 hours ago (3 children)

    Kill -9 is a command on Unix and Linux to send signal 9 (SIGKILL) to a process. That's the version of kill that is the most reliable and has immediate effect.

    Taskkill is a Windows command line program. I believe that taskkill /f uses the TerminateProcess() API. This is more forceful than the End Task button on the Task Manager. There is a different End Process button on the Task Manager that does use TerminateProcess().

    load more comments (3 replies)
    [–] [email protected] 8 points 17 hours ago (1 children)

    I feel like I've had the opposite experience in the gui (maybe a KDE issue?) closing gui windows frequently lock up, and I find I frequently have to drop to the command line in order to properly kill some programs

    [–] [email protected] 2 points 13 hours ago

    That's because the end proces of the GUI sends a sigint, which does jack shit if the program hangs, you only archieve for a higher parent process to obtain it until it can off itself gracefully. You need to right click the process and send a sigkill signal to emulate the command line.

    [–] [email protected] 2 points 16 hours ago (1 children)
    [–] [email protected] 2 points 12 hours ago* (last edited 12 hours ago)

    KDE can murder windows instantly (you have to set a shortcut), or you can also just send SIGKILL to the process

    [–] [email protected] 2 points 16 hours ago

    It even kills threads currently executing a system call! The brutality!

    Never even returned to userspace…

    [–] [email protected] 2 points 17 hours ago (2 children)
    [–] [email protected] 4 points 14 hours ago

    kill -9 $(pidof )

    [–] [email protected] 5 points 16 hours ago (1 children)

    killall works great for this.

    [–] [email protected] 6 points 15 hours ago (2 children)

    At that point you can just hard restart as well. Most motherboards accept 10 to 15 seconds of power button as "my OS is fucked please help" and restart the machine for you.

    [–] [email protected] 6 points 14 hours ago (1 children)

    They also accept pulling the power cord out as "oh no" and shutdown for you!

    load more comments (1 replies)
    [–] [email protected] 2 points 12 hours ago* (last edited 12 hours ago)

    killall just kills all instances of a program, not everything.

    and also, long pressing the power button should just shut it down, no?

    load more comments
    view more: ‹ prev next ›