How to execute another program in C (using exec)

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

In case you have troubles working with the _execl() function and with the #include <process.h>, try solely including <unistd.h> and using the execl() function.
This temporary solved my issues.

Thank you for all the clear explanations!

liviusalecu
Автор

Dude your videos are life saving! I'm beginning to actually understand my computer systems class because of them. Thank you so much!

sleepaleart
Автор

❤ A real Vault of Code!!! Your videos helped me a lot to understand not only how to use system calls, but also the principles of OS. I did bad in my undergraduate OS and computer network courses. Now I am taking graduate OS courses and reviewing the knowledge. Following your video, I am confident in being an OS/computer network engineer or researcher!

yangyue
Автор

I just finished my Shell Project yesterday ! you are reading my mind ...

zaabimahdi
Автор

Tip: For instance, you introduce "execl". Describe the function based on the documentation (so that people actually learn how to read documentation), but describe the key points: The function declaration, a bit of the description, how to handle errors and the return types. Because people are never used to read the documentation. They are used to see the implementation of it in videos and that's it. This will get people used to look into the documentation. Normally, people starting using Linux have a hard time understand the man pages, because they are too technical for beginners. I have solved a lot of problems offline (when i had no internet access) just navigating the man pages. Also, 5 minutes reading docs will potentially save 4 or 5 or more hours of debugging.

MarcoAurelio-svtk
Автор

Bro is there a way to thank you financially for your help ? You saved my semester, I would like to thank you for that

GAMEVUEG
Автор

Just worked with Shell project following your tutorials. Thanks

midhatahir
Автор

You are the hero of CS students the world over! Thanks so much

juggles
Автор

Thank you very much for this video. Excellent explanation and demo. Saved me many hours or reading and messing about.

jobtoolbox
Автор

Thanks a lot, much clearer than my professor's instruction

陳己見
Автор

Great video. Thank you for your great explanation! Helped me a lot!
On a side note, I believe this video is out of order in the Unix Processes in C playlist.

raul_ribeiro_bonifacio
Автор

you probably get alot of comments like this but this video was indeed life saving :D

tuomasbazzan
Автор

Thank you, sir, for great explanation and examples. Good job!

bama
Автор

In my opinion, you are much better than uni's doctors 🌚.
THANK YOU SO MUCH FOR YOUR EFFORT!!

bassamnaji
Автор

I've really been enjoying your content. Thanks for all your great work and well constructed presentations.

AndrewCodeDev
Автор

Thank you so much for this video.. I understood everything.. thanks alot.. . loved it..

akashdev
Автор

Great, but how to you pass a return value, i.e., if the program you launch runs and returns a value, how do you get it? I'd love a simple explanation. Sounds like you can't use errno as the parent shell is gone if the called program launches???

kevinjensen
Автор

Amazing video for exec and os in general.

axmedkayse
Автор

Great video, you were ultra helpful. Thank you very much

multivalfran
Автор

I don't know why execl doesn't work for linux . I tried to find the path using which ls and whereis ls but it doesn't work . But execlp works and pings to google

LinaLina_