How to keep your child from becoming a zombie process (C example)?

Поделиться
HTML-код
  • Опубликовано: 13 мар 2023
  • Patreon ➤ / jacobsorber
    Courses ➤ jacobsorber.thinkific.com
    Website ➤ www.jacobsorber.com
    ---
    How to keep your child from becoming a zombie process (C example)? // If you don't reap them, child processes become zombies by default. But what if you don't want them to? This videos shows you how to create child processes that you never have to wait for (reap) using sigaction.
    Related Videos:
    Zombie Processes: • Understanding Zombie P...
    Signals: • Sending and Handling S...
    Fork: • Creating new processes...
    Make: • Learn make in 60 seconds.
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    www.jacobsorber.com
    people.cs.clemson.edu/~jsorber/
    persist.cs.clemson.edu/
    To Support the Channel:
    + like, subscribe, spread the word
    + contribute via Patreon --- [ / jacobsorber ]
    Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

Комментарии • 27

  • @rorak6142
    @rorak6142 Год назад +20

    title with the last word: 😀
    title without the last word: 💀

    • @rorak6142
      @rorak6142 Год назад +2

      @@AbhishekBM How to keep your child from becoming a zombie......process

  • @JakobKenda
    @JakobKenda Год назад +10

    Your should've gone all in with the thumbnail - "Stop Your Children From Becoming Zombies"

  • @wopmf4345FxFDxdGaa20
    @wopmf4345FxFDxdGaa20 Год назад +41

    I thought this was about parenting. 😂

    • @anon_y_mousse
      @anon_y_mousse Год назад +9

      A good parent doesn't let their child become a zombie?

    • @Tom-gz2dn
      @Tom-gz2dn Год назад +4

      Thought it was about keeping your kids from phone and social media addiction lol

    • @knight_kazul
      @knight_kazul Год назад +2

      @@Tom-gz2dn Kinda similar?

  • @instrate4307
    @instrate4307 10 месяцев назад +4

    Imaging a mommy who randomly clicks on this video and becomes a C programmer

  • @embeddor3023
    @embeddor3023 Год назад +23

    Maybe it's worth to mention that this only works in unix and more a unix thing than a "C" thing...

  • @TheGryphon14
    @TheGryphon14 11 месяцев назад +1

    which font are you using?

  • @JaccovanSchaik
    @JaccovanSchaik Год назад +6

    Interesting, didn't know about that.
    On an unrelated note, I think your memset is wrong. You pass in sizeof(sigaction) as the size, I think that gets you the size of a pointer to the sigaction function. You probably want either sizeof(struct sigaction) or sizeof(sa).

  • @matiasm.3124
    @matiasm.3124 Год назад +1

    Moreeeeee

  • @energy-tunes
    @energy-tunes Год назад

    you gotta hop on the shorts game jacob

  • @fickthissut
    @fickthissut Год назад +1

    NIce title lol

  • @capsey_
    @capsey_ Год назад

    Jacob, I think you forgot to change the text on your thumbnail, there should be "Parenting", not "C/OS"

  • @knight_kazul
    @knight_kazul Год назад +1

    For a second i thought you were gonna talk about actual children 😂.

  • @leokiller123able
    @leokiller123able Год назад +3

    instead of using memset to set the struct to zero you can just do struct sigaction sa = {};

    • @anon_y_mousse
      @anon_y_mousse Год назад

      @Haris Salam My favorite new feature is definitely #embed. I know a lot of people don't get it, but it will be a game changer for some projects.

  • @31redorange08
    @31redorange08 Год назад

    After having viewed a bunch of these videos: Do people actually write C code voluntarily?

    • @31redorange08
      @31redorange08 Год назад

      @Haris Salam Don't you see any problem with the code that's apparently best practice?

    • @31redorange08
      @31redorange08 Год назад

      @Haris Salam I don't know shit about C, so I don't know if this is the canonical way to do it. If it is, then the language has some serious design flaws.

    • @raul-ronaldgalea3046
      @raul-ronaldgalea3046 Год назад +2

      @31redorange08 I'm also curious what you are referring to? what are the design issues that concern you?
      This particular video is actually more about parent-child interactions in unix, not really C specific even

    • @chair547
      @chair547 Год назад +2

      I don't think you understand why C is the way that it is. The amount of complexity that everything in C has attached to it is a direct result of the fact that computers are just rocks we tricked into thinking. Higher-level languages take all this complexity and hide it away from us, and most of the time that's good but sometimes you need to interface with the underlying complexity

    • @Mauricetz
      @Mauricetz Год назад +1

      Other languages don't write themselves :p

  • @josh1234567892
    @josh1234567892 Год назад +3

    brainsssssss