Ironically it's actually the opposite. Linux has signals, and with the exception of SIGKILL and I think SIGABRT they can all be handled gracefully. Windows on the other hand doesn't have signals, it can only TerminateProcess() which is forceful. The illusion of graceful termination on windows is done by sending a Window close message to all of the windows belonging to a given process, however in the event the process has no windows, only forceful termination is available due to the lack of a real mechanism to gracefully terminate processes. That's why the taskkill command tells you a process requires forceful termination when you run it against something headless.
Windows does, in fact, have signals. They're just not all the same as Unix signals, and the behavior is different. Here's a write-up.
You're correct there is no "please terminate but you don't have to" signal in Windows. Windowless processes sometimes make up their own nonstandard events to implement the functionality. As you mentioned, windowed processes have WM_CLOSE.
Memory access violations (akin to SIGSEGV), and other system exceptions can be handled through Structured Exception Handling.
TIL about the console signaling stuff, good to know. I am aware of SEH but that seemed a little too in the weeds for this discussion since that's as you say akin to SIGSEGV
The NT kernel was all built to emulate object orientation (read Smalltalk, not C++) style message passing. That's because it was the 90s, and it's the new technology kernel.
So yeah, expect everything to have more flexibility sending data around, and no standardization at all so you can't have any generic functionality.
You're right about Linux but you're wrong about windows. It is sent to the event loop in windows https://learn.microsoft.com/en-us/windows/win32/winmsg/window-notifications. It's been a long time since it was my job, but you actually had to pass a certification that your application exited gracefully in response to these messages as part of the partner program back in the day.
You clearly didn't read my message...I said a "window close message." I.e...WM_CLOSE. that is not a process signal, it's a window management signal. Hence taskkill not working without /f on headless processes
...right...tell that to cmd.exe or the OpenVPN daemon, or the soft ether VPN daemon, or OpenConsole.exe, or Idk, I only tested 4 that immediately came to mind but my point stands. There are a lot of programs that do not have a window handle and do not bother with window messages.
It also means the OS is in total control of the things it's running. This goes for running programs, shutting down, and crashing. The only crashes I have on my Linux are when I use up memory, and I'm still convinced that even though everything looks seized up, if I left it for hours or days it would probably end up resolving itself. I've had some cases where the OS saw the program wasn't going in a good direction fast enough and killed it.
Most linux systems have two OOM killers, one in the kernel that will execute as a last resort when your system is already frozen up, and one in systemd that should run earlier to prevent your system from freezing up. That one works sometimes, I think it does an okay job actually.
Plus, if something seemingly can't be terminated with that, 99% of the time it's a kernel level lockup (e.g. disk IO). At which point you only have 2 options: kill it via a kernel debugger or (the more likely scenario) perform a reboot.
While the meme is very funny, it is technically incorrect. Linux has two major ways of terminating a process. When Linux wants a process to terminate execution (for whatever reason) it first sends the SIGTERM signal to the process, which basically "asks" the process to terminate itself. This has the advantage, that the process gets the chance to save its state in a way, that the execution can continue at another time. If the process however ignores the SIGTERM signal at some point Linux will instead forcefully terminate the execution using the SIGKILL signal. This represents what the image shows.
Before someone gets mat at me: I know, that there are like 50 more Signals relevant to this, but wanted to keep it simple.
Graceful like closing a laptop and putting it in a backpack only to have windows refuse to shutdown and become a heater until it cooks the battery and ruins the screen....
worse. windows literally goes to sleep when i close the lid after i told it to shutdown.
so when i boot it up again, what happens? inevitably it wakes from sleep, only to remember that i told it to shut down, then it shuts down. then i have to boot again.
To be honest, Mint is no better in that regard on my laptop. Closing my laptop and pulling the power adapter always results in the system not going to sleep mode, but remaining active. Opening it will actually cause it to resume going to sleep. Really annoying.
It absolutely isn't. If a laptop lid is closed, it needs to be sleeping, period. No random updates, no search indexing. I've also had this happen after explicitly putting laptops into sleep AND closing the lid. No idea how Apple is the only company able to do this consistently.
hear me out. how about ... there doesn't need to be a background process that runs constantly and consumes 30% of your processing power and makes the fan spin all the time because it generates so much heat.
I am stuck using an otherwise old but theoretically bearable PC at work running Windows 11 from a spinning HDD. But I'll tell you, when I dug through the registry to turn off all the background indexing nonsense, it became damn near usable.
I haven't used a mac for over a decade, but for the decade or so before that it never happened to me once, either on an iBook or MBP. Perhaps something changed in the meantime.
Apple laptops are typically extremely good when it comes to sleep and suspend.
A major advantage of having a very small range of hardware you have to support is that it's pretty easy to test all possible combinations and make sure they work well together. As far as I'm concerned, Apple has been, and probably always will be the undisputed champion of doing this right.
As a long time user of BSD laptops (apple) I've never had one surprise me when the screen was closed. FWIW I never buy these bsd laptops, they are given to me by $current.employer for work.
I think I've had it happen once over something like a decade of using them. From what I remember it was because I was running something in the terminal that ignored the signals it was sent, so the laptop didn't properly go to sleep. Of course, the program ended up failing because a lot of the things it depended on did suspend themselves and that caused major breakage.
Luckily I noticed a whining sound (fans at maximum speed) from my backpack before anything too bad happened.
If a laptop lid is closed, it needs to be sleeping, period.
See, and here I feel the exact opposite. If itâs docked I donât want it going to sleep just because I closed the lid. I still want to be able to use the two screens that are attached and in use!
If a screen is connected that's another thing, though even that can lead to overheating. For example, a lot of modern laptops suck in air through the keyboard and having the lid closed while working messes up their thermal performance, and heats up the screen to an unhealthy degree.
But having it wake up and try installing an update while sitting in a bag, closed and disconnected from a screen, is a straight up fire hazard, and it happened to me multiple times with windows laptops.
I literally had this happen with my desktop last night, and it's entirely down to Windows actively choosing to go into sleep mode or not. No activity on the computer, click on sleep, the monitors go off and I started to walk away except I noticed that my keyboard and mouse were still on (the first things to turn off when Windows goes to sleep for me) and the fans were still running. Wiggled the mouse and it had only turned the monitors off. I tried it 2 or 3 more times and Windows kept doing the same thing - putting the monitors to sleep and nothing else. I eventually just straight up shut it down with the power button.
I kind of love it though it's like tje fine wine of the internet getting worse and worse yet better and better with time.
Each repost adds another layer of artifact and grit until you can barely make out what the original even meant. It's been screenshotted and cropped and saved and shared, on Facebook and Reddit and Xitter who cared? From phone to phone and site to site the pixels crumble day and night!
The colors fade, the text grows blurry, reposted fast, reposted hurry! Through Discord servers, Instagram feeds and Fedi-instance's it spreads like mold, like digital weeds! One hundred times! One thousand more! The quality drops right through the floor! And yet we laugh and yet we share this crusty meme beyond repair!
So let it crumble, let it fray, this meme will live another day. For in its crust we find the truth, the internet's eternal youth!
Well, I don't know whether it's by default, but systemd does so - if the program doesn't close in a timely manner (or there is an exception configured)
Windows has something called the ShutdownBlockReasonCreate API which enables apps with long running operations to prevent a shutdown to avoid corruption or losing work.
Is there an equivalent for Linux? When used appropriately, it makes shut downs even more graceful.
I don't know the technical details, all I know is that if I click Shut Down while I have unsaved work open, it tells me about it and doesn't just kill everything.
Theyâre different signals. The default handling is the same - terminate - but theyâre triggered by different things and (if the process handles them) handled by separate handlers.
There's a non-obvious freeze function in the Task Manager - for as long as you hold the Ctrl key, it'll stop updating the list. I have no idea why this functionality is hidden, but I guess Dave Plummer had some unusual ideas about UX.
I mean, also look at how windows installs programs. Its like a 100 step process taking several minutes, because just putting the files where they need to be is just too simple.
Or the uninstall program, cant just remove the files, no... Need to run full installer backwards to remove all the registry entries and even reboot the system to get rid of it all.
One of the actual (many) reasons that drove me from Windows. Over the years it became so dirty to have so many old files and registry entries that were abandoned by their respective uninstallers that I became wary of installing anything at all, and that's not the feeling I want with my personal computer.
Uninstallation on Linux needs to do the equivalent of removing registry entries (settings) as well. Neither prices typically takes long. Windows does require more reboots, but you can typically get away without rebooting still.
also it makes it easier to have an overview over what programs are actually installed on the system. and you can easily set up a computer to have certain packages installed by just giving it a list of package names.
I do find it a little amusing the people complain about things that are (an admittedly advanced) config away from being the way they want. As if Linux doesnât have settings buried in a similar way to registry changes.
I once accidentally unmounted the system drive. You know what? Aside from some crash messages and a lost battery indicator, the system just kept going.
I finished my Zoom call just fine, finished what I needed to do real quick and then rebooted.
A friend of mine has a Laptop, where you can easily pull out out the hard drive while the OS is running. We once did that and it worked kinda fine. After plugging the hard drive back in it continued to run like before.
they can be automatically moved to have parent 1 or something like that, so only way to kill them is a reboot. But personally I am yet to setup a stationary (uh, not a laptop) computer and see how it works for me without poweroff at the end of the day
They get moved to the init process (parent 1) if their original parent dies. The init process should always wait on its child processes so they'll get cleaned up then. No reboot needed.
Once they're zombies all they really exist for is to return an exit code for their parent - they're no longer running.
You can also try signalling the parent with a SIGCHLD. Most of the time it does nothing, and hey, you'd be using a stronger version of the kill command anyway if it doesn't work.
Android ain't no better. If I don't pull up my app list and manually kill my media player, it doesnt stop and drains the battery despite tapping the exit menu item
I fully support Linux, but Firefox doesn't deserve that kind of heat. Yes, the Mozilla Foundation has been in hot water over the press release describing the direction and implementation of AI into the browser. But compared to the competition they are still are far better then the rest.
In my experience it is more the reverse is true. If a program truly craps out on me in windows i could at least get the task manager to show / use it to terminate the offender or reboot, at least back when i still used it.
Meanwhile my bazzite task manager is notably not a native part of the OS and takes a few seconds to load, and if the system is in some sort of frozen screen state my only real recourse is hitting the physical force reboot button. The windows manager could sometimes recover from those.
Overall it is of course a much better experience compared to Windows regardless, but still. Everything being essentially modular pieces compiled into a system can evidently also have minor downsides.
I have recovered many times from a broken window session in Linux by switching to a console with ctrl-alt-fN, logging in, and either killing the offending program or just rebooting gracefully.
In Windows my last resort before the nuclear power button is Task Manager with ctrl-esc or ctrl-alt-delete.
While it is 100% understandable, that the lack of a graphical task manager is annoying, you are not completely without options. If you want to terminate a process you can easily type pkill -f process_name into your console. The process name doesn't even have to be exact with the process name (as example the process name is signasignal_desktop, providing signal to the command would be enough to kill it).
I cross-post from .ml to the nearest relevant non-.ml comm to reduce the influence of .ml comms and indirectly, the instance as a whole, to make it an easier decision for other instance admins to defederate because one key reason I identified that admins don't want to defederate is because .ml still has some very large comms and some niche comms.
"If you don't support Russia then you just don't understand geopolitics" ~dessalines, .ml admin, dev https://lemmy.world/post/27352415
And so so much documentation on clear heavy handed censorship and bias also on the link. So much I can't even put them all here because this comment would be really long.
I believe the behavior of its admins (the main admins are Lemmy devs) does harm to the overall growth of the Lemmy-verse and maybe even the Thrediverse (since Lemmy kinda kicked off the Thrediverse) because of its association with the devs of Lemmy and their insistence to use .ml as their personal political platform to spread harmful propaganda
On the outside, bringing up Lemmy frequently leads to comments like "Lemmy? Isn't that the place with a bunch of tankies?" Or "Tried Lemmy, but found it full of pro Russia crap so I left". The best way forward from that I see is to either widely defederate from .ml like the rest of the Triad, or pressure them to put a fair and unbiased as possible admin team.
:::
On the outside, bringing up Lemmy frequently leads to comments like "Lemmy? Isn't that the place with a bunch of tankies?"
The only place I hear people even talk about tankies is on Lemmy. You are really in an echo chamber if you think that tankies are the first thing that people think of when you mention Lemmy. In reality, it's either "What's Lemmy?" or "Lemmy is too difficult. Federation confuses me."
Idk if you've just been under a rock and never noticed (which is admittedly possible, because Reddit just has so many people it's easier to never notice them) or are just being intentionally deceptive. But tankies are absolutely on Reddit, they have multiple subreddits there. Hell, Lemmy started because dessalines got perma banned from Reddit because of their tankie crap and literally did the bender meme
I have personally been asked about the tankies on Lemmy and others have seen it too, it absolutely does come up
I didn't say anything about reddit. Who said anything about reddit?
But yeah, you got me. I don't know anything about this niche reddit community that you're obsessed with for some reason. I guess that means that I'm living under a rock.
149 Comments
Scoopta@programming.dev · 221 pts · 230d
Ironically it's actually the opposite. Linux has signals, and with the exception of SIGKILL and I think SIGABRT they can all be handled gracefully. Windows on the other hand doesn't have signals, it can only TerminateProcess() which is forceful. The illusion of graceful termination on windows is done by sending a Window close message to all of the windows belonging to a given process, however in the event the process has no windows, only forceful termination is available due to the lack of a real mechanism to gracefully terminate processes. That's why the taskkill command tells you a process requires forceful termination when you run it against something headless.
mkwt@lemmy.world · 96 pts · 230d
Windows does, in fact, have signals. They're just not all the same as Unix signals, and the behavior is different. Here's a write-up.
You're correct there is no "please terminate but you don't have to" signal in Windows. Windowless processes sometimes make up their own nonstandard events to implement the functionality. As you mentioned, windowed processes have WM_CLOSE.
Memory access violations (akin to SIGSEGV), and other system exceptions can be handled through Structured Exception Handling.
Scoopta@programming.dev · 12 pts · 230d
TIL about the console signaling stuff, good to know. I am aware of SEH but that seemed a little too in the weeds for this discussion since that's as you say akin to SIGSEGV
marcos@lemmy.world · 14 pts · 229d
The NT kernel was all built to emulate object orientation (read Smalltalk, not C++) style message passing. That's because it was the 90s, and it's the new technology kernel.
So yeah, expect everything to have more flexibility sending data around, and no standardization at all so you can't have any generic functionality.
Feyd@programming.dev · 61 pts · 229d
You're right about Linux but you're wrong about windows. It is sent to the event loop in windows https://learn.microsoft.com/en-us/windows/win32/winmsg/window-notifications. It's been a long time since it was my job, but you actually had to pass a certification that your application exited gracefully in response to these messages as part of the partner program back in the day.
Scoopta@programming.dev · 1 pts · 229d
You clearly didn't read my message...I said a "window close message." I.e...WM_CLOSE. that is not a process signal, it's a window management signal. Hence taskkill not working without /f on headless processes
Feyd@programming.dev · 2 pts · 229d
Long running headless processes on windows generally still have an event loop and a window handle via which they process those messages.
Scoopta@programming.dev · 2 pts · 229d
...right...tell that to cmd.exe or the OpenVPN daemon, or the soft ether VPN daemon, or OpenConsole.exe, or Idk, I only tested 4 that immediately came to mind but my point stands. There are a lot of programs that do not have a window handle and do not bother with window messages.
Feyd@programming.dev · 0 pts · 229d
Service (daemon) lifecycles are managed via the system services api.
Scoopta@programming.dev · 2 pts · 229d
Yep, I'm aware of that too, doesn't change my initial point
Rhaedas@fedia.io · 11 pts · 230d
It also means the OS is in total control of the things it's running. This goes for running programs, shutting down, and crashing. The only crashes I have on my Linux are when I use up memory, and I'm still convinced that even though everything looks seized up, if I left it for hours or days it would probably end up resolving itself. I've had some cases where the OS saw the program wasn't going in a good direction fast enough and killed it.
SaharaMaleikuhm@feddit.org · 6 pts · 229d
Most linux systems have two OOM killers, one in the kernel that will execute as a last resort when your system is already frozen up, and one in systemd that should run earlier to prevent your system from freezing up. That one works sometimes, I think it does an okay job actually.
30p87@feddit.org · 9 pts · 230d
That's fucked up
RickyRigatoni@retrolemmy.com · 8 pts · 229d
sig bart
xan1242@lemmy.dbzer0.com · 1 pts · 230d
Plus, if something seemingly can't be terminated with that, 99% of the time it's a kernel level lockup (e.g. disk IO). At which point you only have 2 options: kill it via a kernel debugger or (the more likely scenario) perform a reboot.
cows_are_underrated@feddit.org · 115 pts · 229d
While the meme is very funny, it is technically incorrect. Linux has two major ways of terminating a process. When Linux wants a process to terminate execution (for whatever reason) it first sends the SIGTERM signal to the process, which basically "asks" the process to terminate itself. This has the advantage, that the process gets the chance to save its state in a way, that the execution can continue at another time. If the process however ignores the SIGTERM signal at some point Linux will instead forcefully terminate the execution using the SIGKILL signal. This represents what the image shows.
Before someone gets mat at me: I know, that there are like 50 more Signals relevant to this, but wanted to keep it simple.
Rubanski@discuss.tchncs.de · 22 pts · 229d
Does the "SIG" stands for "Signal"?
SuspciousCarrot78@lemmy.world · 21 pts · 229d
Gathorall@lemmy.world · 5 pts · 229d
Eh, it works more than 80% of the time.
mnemonicmonkeys@sh.itjust.works · 4 pts · 229d
The problem with Sig is they work too oftem, particularly when you don't want them to
redhat421@lemmy.world · 3 pts · 229d
80% of the time it works every time!
You're likely bumping into processes which are blocked by IO or are zombies.
mrunicornman@lemmy.world · 19 pts · 229d
Special Interest Group. An internal committee convenes to decide the fate of the process.
(I don't know the answer, but I'm pretty sure it stands for signal.)
_edge@discuss.tchncs.de · 4 pts · 228d
It's Secret Intervention Group, but close enough.
smeenz@lemmy.nz · 11 pts · 229d
Yes.
https://man7.org/linux/man-pages/man7/signal.7.html
cows_are_underrated@feddit.org · 3 pts · 229d
I guess, but would have to look that up too (there are quite a lot of signals starting with SIG, so it would make sense that it is this way)
Lemminary@lemmy.world · 17 pts · 229d
Simple answer for us simple folk. I like it. Thank you!
FosterMolasses@leminal.space · 9 pts · 228d
The worst kind of incorrect!
eldain@feddit.nl · 6 pts · 229d
I think it is showing sigterm correctly. Sigkill wipes you from existence without leaving a body or trace of memory.
chaospatterns@lemmy.world · 1 pts · 229d
Ironfacebuster@lemmy.world · 6 pts · 229d
Looks like someone got SIGKILL'd
jet@hackertalks.com · 86 pts · 229d
Graceful like closing a laptop and putting it in a backpack only to have windows refuse to shutdown and become a heater until it cooks the battery and ruins the screen....
gandalf_der_12te@discuss.tchncs.de · 6 pts · 229d
worse. windows literally goes to sleep when i close the lid after i told it to shutdown.
so when i boot it up again, what happens? inevitably it wakes from sleep, only to remember that i told it to shut down, then it shuts down. then i have to boot again.
Petter1@discuss.tchncs.de · 2 pts · 228d
This is old windows problem, 11 does not do it on my work pc, I think
Maybe it is vendor specific đ§
Aganim@lemmy.world · 4 pts · 229d
To be honest, Mint is no better in that regard on my laptop. Closing my laptop and pulling the power adapter always results in the system not going to sleep mode, but remaining active. Opening it will actually cause it to resume going to sleep. Really annoying.
NachBarcelona@piefed.social · -9 pts · 229d
Isn't that more of a PEBCAK?
xav@programming.dev · 19 pts · 229d
Nope. Go read about the "modern suspend" a.k.a. S0ix horror stories. Totally the fault of Microsoft+manufacturers, happens in Linux and Windows.
baropithecus@lemmy.world · 12 pts · 229d
It absolutely isn't. If a laptop lid is closed, it needs to be sleeping, period. No random updates, no search indexing. I've also had this happen after explicitly putting laptops into sleep AND closing the lid. No idea how Apple is the only company able to do this consistently.
gandalf_der_12te@discuss.tchncs.de · 5 pts · 229d
hear me out. how about ... there doesn't need to be a background process that runs constantly and consumes 30% of your processing power and makes the fan spin all the time because it generates so much heat.
Redkey@programming.dev · 5 pts · 228d
I am stuck using an otherwise old but theoretically bearable PC at work running Windows 11 from a spinning HDD. But I'll tell you, when I dug through the registry to turn off all the background indexing nonsense, it became damn near usable.
maccentric@sh.itjust.works · 4 pts · 229d
This absolutely can and does happen on Apple hardware
baropithecus@lemmy.world · 6 pts · 229d
I haven't used a mac for over a decade, but for the decade or so before that it never happened to me once, either on an iBook or MBP. Perhaps something changed in the meantime.
merc@sh.itjust.works · 1 pts · 229d
Apple laptops are typically extremely good when it comes to sleep and suspend.
A major advantage of having a very small range of hardware you have to support is that it's pretty easy to test all possible combinations and make sure they work well together. As far as I'm concerned, Apple has been, and probably always will be the undisputed champion of doing this right.
jet@hackertalks.com · 1 pts · 228d
As a long time user of BSD laptops (apple) I've never had one surprise me when the screen was closed. FWIW I never buy these bsd laptops, they are given to me by $current.employer for work.
merc@sh.itjust.works · 2 pts · 228d
I think I've had it happen once over something like a decade of using them. From what I remember it was because I was running something in the terminal that ignored the signals it was sent, so the laptop didn't properly go to sleep. Of course, the program ended up failing because a lot of the things it depended on did suspend themselves and that caused major breakage.
Luckily I noticed a whining sound (fans at maximum speed) from my backpack before anything too bad happened.
Hawke@lemmy.world · 1 pts · 221d
See, and here I feel the exact opposite. If itâs docked I donât want it going to sleep just because I closed the lid. I still want to be able to use the two screens that are attached and in use!
baropithecus@lemmy.world · 1 pts · 221d
If a screen is connected that's another thing, though even that can lead to overheating. For example, a lot of modern laptops suck in air through the keyboard and having the lid closed while working messes up their thermal performance, and heats up the screen to an unhealthy degree.
But having it wake up and try installing an update while sitting in a bag, closed and disconnected from a screen, is a straight up fire hazard, and it happened to me multiple times with windows laptops.
Hawke@lemmy.world · 1 pts · 221d
Oh yeah for sure. If only we had âbag detectionâ I would agree.
Iâd argue that an overheating when the lid is closed not in a bag is a major design flaw.
Iâve never seen it but I mostly see business laptops not gaming or consumer laptops so shitty designs are out there Iâm sure.
NachBarcelona@piefed.social · -7 pts · 229d
Never happened to me lmao. Apple is for tech illiterates anyways so it's inconsequential.
EldritchFeminity@lemmy.blahaj.zone · 3 pts · 229d
I literally had this happen with my desktop last night, and it's entirely down to Windows actively choosing to go into sleep mode or not. No activity on the computer, click on sleep, the monitors go off and I started to walk away except I noticed that my keyboard and mouse were still on (the first things to turn off when Windows goes to sleep for me) and the fans were still running. Wiggled the mouse and it had only turned the monitors off. I tried it 2 or 3 more times and Windows kept doing the same thing - putting the monitors to sleep and nothing else. I eventually just straight up shut it down with the power button.
thenextguy@lemmy.world · 76 pts · 230d
/c/programmer_ignorance
fuckwit_mcbumcrumble@lemmy.dbzer0.com · 38 pts · 230d
This meme gets crustier and crustier every time I see it. Itâs amazing after all these years people still post this.
amorpheus@lemmy.world · 6 pts · 229d
Eh, it's funny even if it's inaccurate.
cm0002@infosec.pub · -7 pts · 229d
I kind of love it though it's like tje fine wine of the internet getting worse and worse yet better and better with time.
Each repost adds another layer of artifact and grit until you can barely make out what the original even meant. It's been screenshotted and cropped and saved and shared, on Facebook and Reddit and Xitter who cared? From phone to phone and site to site the pixels crumble day and night!
The colors fade, the text grows blurry, reposted fast, reposted hurry! Through Discord servers, Instagram feeds and Fedi-instance's it spreads like mold, like digital weeds! One hundred times! One thousand more! The quality drops right through the floor! And yet we laugh and yet we share this crusty meme beyond repair!
So let it crumble, let it fray, this meme will live another day. For in its crust we find the truth, the internet's eternal youth!
Quibblekrust@thelemmy.club · 16 pts · 229d
The image's content is plain wrong. Waxing poetic about JPEG artifacts doesn't make this image any more interesting or funny. It's just dumb.
NeatNit@discuss.tchncs.de · 74 pts · 229d
Stop spreading this lie. Linux has a more graceful shutdown process than Windows ever did. It doesn't abruptly kill everything.
Bazell@lemmy.zip · 22 pts · 229d
Unless you told him to do so. đ
UnfortunateShort@lemmy.world · 4 pts · 229d
Well, I don't know whether it's by default, but systemd does so - if the program doesn't close in a timely manner (or there is an exception configured)
chaospatterns@lemmy.world · 4 pts · 229d
Windows has something called the ShutdownBlockReasonCreate API which enables apps with long running operations to prevent a shutdown to avoid corruption or losing work.
Is there an equivalent for Linux? When used appropriately, it makes shut downs even more graceful.
NeatNit@discuss.tchncs.de · 5 pts · 229d
I don't know the technical details, all I know is that if I click Shut Down while I have unsaved work open, it tells me about it and doesn't just kill everything.
kogasa@programming.dev · 4 pts · 228d
Systemd has something like this. I don't know if the kernel itself does.
Shanmugha@lemmy.world · 59 pts · 229d
Windows:
rustydrd@sh.itjust.works · 19 pts · 229d
Such grace.
JelleWho@lemmy.world · 14 pts · 229d
There is a windows registry hack to set the shutdown wait time for 1s and that did fix it for me. But every update they turn it back to unlimited.
(I ended up installing Linux, I only have the dnf5daemon server holding the shutdown up for atnost 5min now. But I haven't tried to fix it)
Shanmugha@lemmy.world · 15 pts · 229d
Which is why in my Windows days I got a habit of turning computer off with Windows + R --> shutdown -s -f -t 0
Windows just works, my ass :)
vogi@piefed.social · 54 pts · 230d
Isn't that what
SIGTERMis? A request to gracefully shutdown processes.9point6@lemmy.world · 25 pts · 230d
kill, and I swear to god if you're still there when Ips, I'm getting out the-969420@lemmy.world · 17 pts · 229d
marcos@lemmy.world · 9 pts · 229d
Yeah, by default
killsends sigterm, and not kill the process at all.It's the correct behavior, sending sigkill by default would be harmful. Now take a look at how
killallworked in Solaris (before it adopted GNU).toynbee@lemmy.world · 3 pts · 229d
https://youtube.com/watch?v=Fow7iUaKrq4
9point6@lemmy.world · 2 pts · 229d
Okay that took me by surprise
I'll be sharing this
toynbee@lemmy.world · 1 pts · 229d
Please do!
pewpew@feddit.it · 13 pts · 230d
Systemd waits until the services terminate before shutting down
andyburke@fedia.io · 10 pts · 230d
killall -9SlurpingPus@lemmy.world · 1 pts · 229d
I bet the GUI environments also have their own mechanisms to indicate that the app needs to close, before whipping out the signals.
cannedtuna@lemmy.world · 1 pts · 230d
Howâs that differ from
SIGHUP?pivot_root@lemmy.world · 10 pts · 230d
Historical context, delivery, and handling.
HUPâhang upâis sent to indicate the TTY is closed.
TERMâterminateâ is sent by request.
What happens when received is usually up to the process. Most of them just leave the defaults, which is to exit.
firelizzard@programming.dev · 3 pts · 229d
Theyâre different signals. The default handling is the same - terminate - but theyâre triggered by different things and (if the process handles them) handled by separate handlers.
Rolive@discuss.tchncs.de · 48 pts · 229d
Windows task manager:
Let's play a whack a mole game where the app you're trying to kill constantly moves up and down a list by default! Enjoy!
egrets@lemmy.world · 29 pts · 229d
There's a non-obvious freeze function in the Task Manager - for as long as you hold the Ctrl key, it'll stop updating the list. I have no idea why this functionality is hidden, but I guess Dave Plummer had some unusual ideas about UX.
Gonzako@lemmy.world · 8 pts · 229d
Just sort by ram size
mvirts@lemmy.world · 38 pts · 229d
Lol as we've discussed before, inaccurate but funny.
ohshit604@sh.itjust.works · 5 pts · 229d
So youâre telling me SIGTERM doesnât actually send a hit squad to my house to assassinate the program? Lame.
Genuinely can you link the previous discussion?
_edge@discuss.tchncs.de · 4 pts · 228d
SIGKILL does, though
Dupelet@piefed.social · 37 pts · 229d
Windows: If you can't exit gracefully, I'll make sure you never exit at all
muusemuuse@sh.itjust.works · 11 pts · 229d
Oh dear, my toe seems to have found the switch on my surge protector. I win.
Natanael@infosec.pub · 6 pts · 229d
Now Windows won't boot
muusemuuse@sh.itjust.works · 3 pts · 229d
Take the upgrade
Taleya@aussie.zone · 34 pts · 229d
Windows treats user commands like most tech treats consent. Negotiable, ignorable.
Linux brooks no bullshit. The program will do as it is told.
CameronDev@programming.dev · 10 pts · 228d
That isn't exclusively true. Programs can capture SIGTERM and ignore it, or do as they please, SIGKILL is non-negotiable though.
Windows does have an equivalent to SIGKILL as well, in
taskkill /F.myotheraccount@lemmy.world · 8 pts · 228d
Yeah. I regularly wake up to my work computer having nonconsensually rebooted overnight (closing all open applications, because who cares)
Taleya@aussie.zone · 10 pts · 228d
96% through recovering an attached 20tb RAID and windows update decides i should go fuck myself.
And that is why it's only on my work laptop. And only because i'm forced at gunpoint
Magnum@infosec.pub · 3 pts · 228d
They force you at gunpoint at work? To use Windows?????
Taleya@aussie.zone · 4 pts · 228d
Yes. They stuck the barrel up my butt and threaten to pull the trigger. Gonna turn me into a big polo mint.
Magnum@infosec.pub · 0 pts · 227d
Life savers? What the fuck is a polo mint. Ay mate is it raining cats and dogs over there?
KeenFlame@feddit.nu · 27 pts · 229d
Oh sweet summer children.. its worse. Linux tells the program to kill itself, then makes sure it happens
1984@lemmy.today · 24 pts · 229d
I mean, also look at how windows installs programs. Its like a 100 step process taking several minutes, because just putting the files where they need to be is just too simple.
Or the uninstall program, cant just remove the files, no... Need to run full installer backwards to remove all the registry entries and even reboot the system to get rid of it all.
victorz@lemmy.world · 13 pts · 229d
One of the actual (many) reasons that drove me from Windows. Over the years it became so dirty to have so many old files and registry entries that were abandoned by their respective uninstallers that I became wary of installing anything at all, and that's not the feeling I want with my personal computer.
FishFace@piefed.social · 7 pts · 229d
Uninstallation on Linux needs to do the equivalent of removing registry entries (settings) as well. Neither prices typically takes long. Windows does require more reboots, but you can typically get away without rebooting still.
Natanael@infosec.pub · 7 pts · 229d
The main difference is Linux package managers with their package metadata is better at cleaning up than corresponding Windows installers.
Especially antivirus programs, they are the worst
WhiskyTangoFoxtrot@lemmy.world · 5 pts · 229d
Linux settings are stored in files in your home directory, and uninstalling typically leaves those files intact.
FishFace@piefed.social · 4 pts · 229d
Some of them, but not all of them. Uninstalling things on windows also often leaves registry entries. It's just not that different
angband@lemmy.world · 2 pts · 229d
That's what --purge is for, in apt.
Slashme@lemmy.world · 5 pts · 229d
"apt install " is just so much nicer than running some weird installer.
gandalf_der_12te@discuss.tchncs.de · 3 pts · 229d
also it makes it easier to have an overview over what programs are actually installed on the system. and you can easily set up a computer to have certain packages installed by just giving it a list of package names.
smeenz@lemmy.nz · 1 pts · 229d
https://learn.microsoft.com/en-us/windows/package-manager/winget/
aloofPenguin@lemmy.world · 3 pts · 229d
The thing with winget, i believe, I that when installing non-MS store programs, you still have to go through the program's installer.Â
Whereas you don't need to look at an installer with
apt or similarHawke@lemmy.world · 2 pts · 221d
Winget , chocolatey, scoop⌠Windows is feeling almost like a real OS now!
copacetic@discuss.tchncs.de · 21 pts · 229d
Android/iOS users: What is âclosingâ? What is a âprogramâ?
Lemminary@lemmy.world · 7 pts · 229d
Android folks generally know because we have to close them sometimes. Don't know about iPhoners
ohshit604@sh.itjust.works · 2 pts · 229d
May use an iPhone but definitely use a Linux desktop.
CanadaPlus@lemmy.sdf.org · 15 pts · 229d
From what I've heard about Windows, it works more like the Simpsons "Barney coming up behind Moe" meme.
So, as it should be, Tux.
Zamboni_Driver@lemmy.ca · 15 pts · 228d
I get it windows is evil and bloated, blah blah blah.
But to hear some of you describe the problems that you have using windows makes me think that you're as incompetent as my grandmother.
KairuByte@lemmy.dbzer0.com · 2 pts · 228d
I do find it a little amusing the people complain about things that are (an admittedly advanced) config away from being the way they want. As if Linux doesnât have settings buried in a similar way to registry changes.
MehBlah@lemmy.world · 9 pts · 229d
Yup. Sometimes you like to fire a few shots manually just for fun.
muusemuuse@sh.itjust.works · 7 pts · 229d
Sudo htop
âI wonder how important this isâŚ.â
Nothing happens
Hmm
Allero@lemmy.today · 6 pts · 229d
I once accidentally unmounted the system drive. You know what? Aside from some crash messages and a lost battery indicator, the system just kept going.
I finished my Zoom call just fine, finished what I needed to do real quick and then rebooted.
It all went back and was just fine.
cows_are_underrated@feddit.org · 4 pts · 229d
A friend of mine has a Laptop, where you can easily pull out out the hard drive while the OS is running. We once did that and it worked kinda fine. After plugging the hard drive back in it continued to run like before.
Allero@lemmy.today · 1 pts · 229d
Beautiful
knexcar@lemmy.world · 0 pts · 229d
Which OS?
cows_are_underrated@feddit.org · 5 pts · 229d
Linux
MehBlah@lemmy.world · 2 pts · 229d
I was thinking more kill -9
BeigeAgenda@lemmy.ca · 8 pts · 229d
In Linux you get zombie processes hanging around when things go wrong, and you can't get rid of those.
LedgeDrop@lemmy.zip · 14 pts · 229d
Yes you can. You get rid of the zombies by killing the parent process.
webghost0101@sopuli.xyz · 6 pts · 229d
Zombies are getting to be parents now?
Woke has gone too far, in my day they would have gotten a bullet between the eyes.
DawnOfTime@lemmy.blahaj.zone · 1 pts · 229d
I think zombies go under kernel or "root process" by default now
Shanmugha@lemmy.world · 3 pts · 229d
they can be automatically moved to have parent 1 or something like that, so only way to kill them is a reboot. But personally I am yet to setup a stationary (uh, not a laptop) computer and see how it works for me without poweroff at the end of the day
asret@lemmy.zip · 5 pts · 229d
They get moved to the init process (parent 1) if their original parent dies. The init process should always wait on its child processes so they'll get cleaned up then. No reboot needed.
Once they're zombies all they really exist for is to return an exit code for their parent - they're no longer running.
palordrolap@fedia.io · 1 pts · 229d
You can also try signalling the parent with a SIGCHLD. Most of the time it does nothing, and hey, you'd be using a stronger version of the kill command anyway if it doesn't work.
Sam_Bass@lemmy.world · 7 pts · 229d
Android ain't no better. If I don't pull up my app list and manually kill my media player, it doesnt stop and drains the battery despite tapping the exit menu item
HulkSmashBurgers@reddthat.com · 2 pts · 228d
kill -9 that motherfucker.
TheBannedLemming@lemmy.world · 2 pts · 229d
I fully support Linux, but Firefox doesn't deserve that kind of heat. Yes, the Mozilla Foundation has been in hot water over the press release describing the direction and implementation of AI into the browser. But compared to the competition they are still are far better then the rest.
softwarist@programming.dev · 4 pts · 228d
The joke's not about Firefox; you could swap in any Linux program.
TheBannedLemming@lemmy.world · 1 pts · 225d
I know, I am just saying there are other examples.
borQue@lemmy.zip · 1 pts · 229d
Microscum sucks soo hard it will see its own asshole as a new opening.
GregorGizeh@lemmy.zip · 1 pts · 230d
In my experience it is more the reverse is true. If a program truly craps out on me in windows i could at least get the task manager to show / use it to terminate the offender or reboot, at least back when i still used it.
Meanwhile my bazzite task manager is notably not a native part of the OS and takes a few seconds to load, and if the system is in some sort of frozen screen state my only real recourse is hitting the physical force reboot button. The windows manager could sometimes recover from those.
Overall it is of course a much better experience compared to Windows regardless, but still. Everything being essentially modular pieces compiled into a system can evidently also have minor downsides.
andyburke@fedia.io · 7 pts · 229d
ctrl-alt-f2 (or f3, f4)
this should switch away from graphical mode to a terminal.
log in kill whatever needs killin'
knexcar@lemmy.world · 0 pts · 229d
I thought Linux was supposed to be easy to use and that implies not needing to use a terminal?
Micromot@piefed.social · 2 pts · 229d
In everyday use you shouldn't need to use the terminal but for crashes it can be very helpful to switch between ttys
folekaule@lemmy.world · 2 pts · 229d
I have recovered many times from a broken window session in Linux by switching to a console with ctrl-alt-fN, logging in, and either killing the offending program or just rebooting gracefully.
In Windows my last resort before the nuclear power button is Task Manager with ctrl-esc or ctrl-alt-delete.
Allero@lemmy.today · 2 pts · 229d
Honestly, yes.
Linux lacks a native Task manager, and this is one of the "death by a thousand cuts" roadblocks that prevent its adoption.
A user must be able to launch a graphical tool to manage processes even if everything else froze. That's just basic usability.
Can it be currently resolved with a terminal? Yes. Should it be resolved with a terminal? No.
cows_are_underrated@feddit.org · 1 pts · 229d
While it is 100% understandable, that the lack of a graphical task manager is annoying, you are not completely without options. If you want to terminate a process you can easily type pkill -f process_name into your console. The process name doesn't even have to be exact with the process name (as example the process name is signasignal_desktop, providing signal to the command would be enough to kill it).
PacMan@sh.itjust.works · 1 pts · 229d
I killed-9 but if Iâm done Iâm done and just calling a hard soft reboot with REISUB and if you know you know
cm0002@infosec.pub · 2 pts · 229d
Lolol I just needed that yesterday
WhiskyTangoFoxtrot@lemmy.world · 2 pts · 229d
https://www.youtube.com/watch?v=0rG74rG_ubs
commie@lemmy.dbzer0.com · 1 pts · 229d
op:
https://lemmy.ml/post/41704784
cm0002@infosec.pub · 8 pts · 229d
::: spoiler Why am I cross-posting .ml content?
dejected_warp_core@lemmy.world · 4 pts · 229d
Thank you for your service.
zarkanian@sh.itjust.works · 0 pts · 229d
The only place I hear people even talk about tankies is on Lemmy. You are really in an echo chamber if you think that tankies are the first thing that people think of when you mention Lemmy. In reality, it's either "What's Lemmy?" or "Lemmy is too difficult. Federation confuses me."
cm0002@infosec.pub · 2 pts · 229d
Idk if you've just been under a rock and never noticed (which is admittedly possible, because Reddit just has so many people it's easier to never notice them) or are just being intentionally deceptive. But tankies are absolutely on Reddit, they have multiple subreddits there. Hell, Lemmy started because dessalines got perma banned from Reddit because of their tankie crap and literally did the bender meme
I have personally been asked about the tankies on Lemmy and others have seen it too, it absolutely does come up
zarkanian@sh.itjust.works · 0 pts · 229d
I didn't say anything about reddit. Who said anything about reddit?
But yeah, you got me. I don't know anything about this niche reddit community that you're obsessed with for some reason. I guess that means that I'm living under a rock.
Proprietary_Blend@lemmy.world · 0 pts · 229d
What's Linus?