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

  Рет қаралды 9,336

Jacob Sorber

Jacob Sorber

Жыл бұрын

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 Жыл бұрын
title with the last word: 😀 title without the last word: 💀
@rorak6142
@rorak6142 Жыл бұрын
@@AbhishekBM How to keep your child from becoming a zombie......process
@instrate4307
@instrate4307 Жыл бұрын
Imaging a mommy who randomly clicks on this video and becomes a C programmer
@JakobKenda
@JakobKenda Жыл бұрын
Your should've gone all in with the thumbnail - "Stop Your Children From Becoming Zombies"
@wopmf4345FxFDxdGaa20
@wopmf4345FxFDxdGaa20 Жыл бұрын
I thought this was about parenting. 😂
@anon_y_mousse
@anon_y_mousse Жыл бұрын
A good parent doesn't let their child become a zombie?
@Tom-gz2dn
@Tom-gz2dn Жыл бұрын
Thought it was about keeping your kids from phone and social media addiction lol
@knight_kazul
@knight_kazul Жыл бұрын
@@Tom-gz2dn Kinda similar?
@embeddor3023
@embeddor3023 Жыл бұрын
Maybe it's worth to mention that this only works in unix and more a unix thing than a "C" thing...
@marc-andrebrun8942
@marc-andrebrun8942 9 ай бұрын
linux is a C thing!
@knight_kazul
@knight_kazul Жыл бұрын
For a second i thought you were gonna talk about actual children 😂.
@JaccovanSchaik
@JaccovanSchaik Жыл бұрын
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 Жыл бұрын
Moreeeeee
@TheGryphon14
@TheGryphon14 Жыл бұрын
which font are you using?
@josh1234567892
@josh1234567892 Жыл бұрын
brainsssssss
@fickthissut
@fickthissut Жыл бұрын
NIce title lol
@energy-tunes
@energy-tunes Жыл бұрын
you gotta hop on the shorts game jacob
@capsey_
@capsey_ Жыл бұрын
Jacob, I think you forgot to change the text on your thumbnail, there should be "Parenting", not "C/OS"
@leokiller123able
@leokiller123able Жыл бұрын
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.
@dorle3046
@dorle3046 Жыл бұрын
@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 Жыл бұрын
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 Жыл бұрын
Other languages don't write themselves :p
How does fork work with open files?
13:12
Jacob Sorber
Рет қаралды 9 М.
How to Check Your Pointers at Runtime
14:12
Jacob Sorber
Рет қаралды 31 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 102 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 21 МЛН
Bit Fields in C. What are they, and how do I use them?
13:26
Jacob Sorber
Рет қаралды 80 М.
Zombie Processes
7:21
Pavel Yosifovich
Рет қаралды 937
Binary data exercise: how to tell if a file is a jpeg?
17:48
Jacob Sorber
Рет қаралды 13 М.
Another way to check pointers at runtime in C
12:16
Jacob Sorber
Рет қаралды 12 М.
find memory errors quickly. (-fsanitize, addresssanitizer)
9:44
Jacob Sorber
Рет қаралды 16 М.
How to Read Just One Character from the Terminal (stdin)?
10:34
Jacob Sorber
Рет қаралды 10 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН