• 6 Posts
Joined 1 year ago
Cake day: June 18th, 2023


  • CameronDev@programming.devtoScience Memes@mander.xyzCosplay
    2 days ago

    From a reddit comment, so could be lies:

    yes…here’s an excerpt from the story…

    “An Electrician ended up with stars in his eyes after being zapped by 14,000 volts during a serious accident at work. The 42 year-old man from California developed the eye disease cataracts after the high voltage current surged through his body. His shoulder touched a live wire and the current passed through his entire body - including the optic nerve, which connects the eye to the brain. The effect was two bizarre star-shaped electrical burns in his eyes, according to The New England Journal of Medicine. Dr Bobby Korn, an associate professor of clinical ophthalmology at the University of California, San Diego, treated the unnamed patient. Dr Korn told NBC News: “The extreme current and voltage that passed through this important natural wire caused damage to the optic nerve itself.” Cataracts is clouding on the lens inside the eye which leads to limited vision and the most common cause of blindness. The electrician’s story was published in the January issue of the journal. The accident happened 10 years ago and the patient still has poor vision in both of his eyes.”

    To go through that with only “poor vision”, pretty damn lucky

  • I think that should do it. I’ll try later today and report back.

    Of course, this risks getting into an even worse state, because if the parent later tries to correctly wait for its child, the call will hang.

    Edit: Will clean up the orphan/defunct process.

    If the parent ever tried to wait, they would either get ECHILD if there are no children, or it would block until a child exited.

    Will likely cause follow on issues - reaping someone elses children is generally frowned upon :D.

  • CameronDev@programming.devtolinuxmemes@lemmy.worldNo Mercy
    12 days ago

    Zombie processes are already dead. They aren’t executing, the kernel is just keeping a reference to them so their parent process can check their return code (waitpid).

    All processes becomes zombies briefly after they exit, just usually their parents wait on them correctly. If their parents exit without waiting on the child, then the child gets reparented to init, which will wait on it. If the parent stays alive, but doesn’t wait on the child, then it will remain zombied until the parent exits and triggers the reparenting.

    Its not really Linux’s fault if processes don’t clean up their children correctly, and I’m 99% sure you can zombie a child on redox given its a POSIX OS.

    Edit: https://gist.github.com/cameroncros/8ae3def101efc08be2cd69846d9dcc81 - Rust program to generate orphans.