this post was submitted on 29 Oct 2024
729 points (94.6% liked)

linuxmemes

21126 readers
885 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) 50 comments
    sorted by: hot top controversial new old
    [–] mkwt@lemmy.world 9 points 1 day 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().

    [–] LifeInMultipleChoice@lemmy.dbzer0.com 1 points 1 day ago (1 children)

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

    [–] mkwt@lemmy.world 3 points 1 day ago (1 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().

    [–] LifeInMultipleChoice@lemmy.dbzer0.com 1 points 1 day ago (1 children)

    Is the 9 pertaining to permissions like chmod uses them? I'll have to look it up sometime. Been awhile since I've ever actually needed to force quit something in a Linux os

    [–] 0xD@infosec.pub 1 points 1 day ago (1 children)
    [–] LifeInMultipleChoice@lemmy.dbzer0.com 2 points 1 day ago* (last edited 1 day ago) (1 children)

    Thanks for that, I'll have a ganter. Need to spin up a new VM soon and figure out a new distro to play with. Been slacking on exploring new things. Mostly only played with Yellow dog (small enough to dual boot on a PS3 with 512mb of ram back in the day), Ubuntu, Debian for other things. Likely will look for something that will work well for a media server.

    load more comments (1 replies)
    [–] MajinBlayze@lemmy.world 8 points 1 day 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

    [–] fushuan@lemm.ee 2 points 1 day 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.

    I've honestly not had this problem on windows since Windows 8.

    [–] urfavlaura@lemmy.ml 1 points 1 day ago (1 children)

    btw funny story since many comments mention NFS/CIFS:

    I have a share mounted at /smb and the server sometimes just dies so when I want to unmount it I run umount /smb but my shell (zsh) hangs after typing umount /sm and the b doesn't even show

    I guess zsh does a kind of stat() on everything you type but bash came to save the day

    load more comments (1 replies)
    [–] boredsquirrel@slrpnk.net 2 points 1 day ago (1 children)
    [–] zea_64@lemmy.blahaj.zone 2 points 1 day ago* (last edited 1 day ago)

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

    [–] henfredemars@infosec.pub 2 points 1 day ago

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

    Never even returned to userspace…

    [–] kekmacska@lemmy.zip 2 points 1 day ago (2 children)
    [–] henfredemars@infosec.pub 5 points 1 day ago (1 children)

    killall works great for this.

    [–] BonerMan@ani.social 6 points 1 day 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.

    [–] RustyNova@lemmy.world 6 points 1 day ago (1 children)

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

    [–] BonerMan@ani.social 1 points 1 day ago

    The most I work with restart, but I think you can configure it in the bios.

    [–] WhyJiffie@sh.itjust.works 2 points 1 day ago* (last edited 1 day ago)

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

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

    [–] jwt@programming.dev 4 points 1 day ago

    kill -9 $(pidof )

    load more comments
    view more: ‹ prev next ›