• 1 Post
  • 139 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle




  • Very weird. Maybe its the client. Can’t see it in the browser either

    Ah, I see whats happened, you didnt put anything in the square brackets:

    [](https://www.freecodecamp.org/news/shell-scripting-crash-course-how-to-write-bash-scripts-in-linux/)
    

    should be:

    [Cool Tutorial](https://www.freecodecamp.org/news/shell-scripting-crash-course-how-to-write-bash-scripts-in-linux/)
    

    resulting in:

    Cool Tutorial












  • CameronDev@programming.devtolinuxmemes@lemmy.worldNo Mercy
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    2 months ago

    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
    link
    fedilink
    arrow-up
    83
    arrow-down
    1
    ·
    edit-2
    2 months 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.