On Linux you can “ask” a program to close. That’s what happens when you press close. (Sigterm)
However, you can also use sigkill which really should not be used. That just tells the kernel to stop execution of that process. That won’t do things like remove resource locks. All it does is free up the memory and remove the process from the scheduler.
On Windows, there is no such thing as signals. There is a equivalent system however. If you want to gracefully close a program you can simulate the pushing of the close button. This is pretty much equivalent to a user pushing the close button. If you want kill a program you can use terminate process which tells the Windows kernel to stop running the process and to clean up memory. However, this doesn’t clear any resource locks and will also cause issues.
The big take away is that it is a really bad idea to kill applications instead of letting them terminate. This will create things like zombie processes and locked files no matter what system you are on.
Also just a little bit of Windows foo:
taskkill /IM process.exe ask a process to terminate. Runs cleanup code and gracefully exits
taskkill /F/IM process.exe kills the program. Exits uncleanly and will break things.
There is no concept of locked files in extfs, much less inside the kernel. Resource locks and unkillable processes is some windows bullshit that no sane operating system would touch with a ten foot pole.
From my experience, killing a process from task manager does free up any file locks held by the process. However, I wouldn’t consider it being graceful, any in-app cleanup is lost this way.
That is not how it works.
On Linux you can “ask” a program to close. That’s what happens when you press close. (Sigterm)
However, you can also use sigkill which really should not be used. That just tells the kernel to stop execution of that process. That won’t do things like remove resource locks. All it does is free up the memory and remove the process from the scheduler.
On Windows, there is no such thing as signals. There is a equivalent system however. If you want to gracefully close a program you can simulate the pushing of the close button. This is pretty much equivalent to a user pushing the close button. If you want kill a program you can use terminate process which tells the Windows kernel to stop running the process and to clean up memory. However, this doesn’t clear any resource locks and will also cause issues.
The big take away is that it is a really bad idea to kill applications instead of letting them terminate. This will create things like zombie processes and locked files no matter what system you are on.
Also just a little bit of Windows foo:
taskkill /IM process.exe
ask a process to terminate. Runs cleanup code and gracefully exitstaskkill /F /IM process.exe
kills the program. Exits uncleanly and will break things.What the duck Microsoft bullshit is this?
There is no concept of locked files in extfs, much less inside the kernel. Resource locks and unkillable processes is some windows bullshit that no sane operating system would touch with a ten foot pole.
You need resource locks to prevent race conditions. Linux has locks as well as every other OS.
Locks are only held during system calls. Process termination is handled on the system call boundary.
You’re projecting windows kernel insanity where it doesn’t belong.
From my experience, killing a process from task manager does free up any file locks held by the process. However, I wouldn’t consider it being graceful, any in-app cleanup is lost this way.
I have to use the terminate program thing SO OFTEN on my steamdeck. The browser just freezes.
That’s not good and sounds like a side effect of a different issue
Hardware caput. Finito.