Psychopath Dev

devilish666@lemmy.world to Programmer Humor@programming.dev – 411 points –
49

"how to kill orphaned children in Java"

what do you mean Java is also the name of an island

A bit like when we renamed all the master/slave terminology using different phrasing that's frankly more useful a lot of the time, I think it's about time we got rid of this "child" task nonsense. I suggest "subtask". Then we can reword these books into something that no-one can make stupid jokes about any more, like "how to keep your subs in line" and "how to punish your subs when they've misbehaved".

I actually got flagged on reddit for a joke comment I made with a 3 liner code block that had something like thread.kill()

It thought I was promoting violence lol

Imagine the possibilities when AI gets involved and can't distinguish between killing children (programming) vs IRL.

At some I added logging to a thread pool, when it gave up on child-threads, it would be logging things like

"Child 123 is being aborted"

Not the best of phrasing for people that didn't know what that was about...

Dumping core

Oh, thats why captains in Star Trek do it every even remotely excusable change they get.
("Why did we dump the core & why did it detonate??" - "I wanted to see if I can brew coffee in the vacuum of space.")

Could we please let this 30+ year old joke just die?

Nah, we gotta kill, preferably with -9. 🤣

You know I’ve known for decades that -9 is basically “nuke it from orbit”, but does anyone know what the “9” actually means or where it came from?

It's the number of the signal sent, 9 is for SIGKILL. You can send various signals with kill, and depending on how application was made it may react on all signals with dying, or meaningfully process most of them. Afaik, SIGKILL can't be processed by the app, and it always means just that: "die already".

Checked in Wikipedia, that's about right but there are more details I left out, mostly because didn't know about them, too: POSIX signals

Thank you! That’s what I was looking for.

In languages like C, your application code can register what is called a signal handler. These functions get called when the process receives a signal. You could do something like reload a config file for example, without the user needing to stop and restart the process.

Many here will be seeing this for the first time. For others it will be a fun reminder of something they haven't seen for a long time. Still others will find it to be the same old tired shit they're sick of.

When you see the same old tired shit on Lemmy (or any social media), just move on. There will be plenty that is new to you.

We’re gonna put it on a scheduled repost loop, with it being stickied for at least an hour every post. A different hour each time too.