What part of the OS cares when we return 0 in C?

I understand we return 0 when a program execute successfully, but what components of the operating system, specifically Linux, actually recognize this status?

Attached: fuckingdork.jpg (2832x4240, 659K)

Other urls found in this thread:

dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html
twitter.com/SFWRedditImages

It is used by calling programs.
korn shells and other things that check the return code before continuing or doing some cleanup.

Isn't Korn shell pretty much phased out, outside of legacy?

You can check the return code of any program in bash, too. It helps people build scripts decide what to do after a program finished executing, since they have to determine if it succeeded or failed some way

>I understand we return 0 when a program execute successfully,
Have fun with your boilerplate and weak ass type safety in your legacy language

Derivatives of it, like pdksh, are widely used and actively developed today
But that's beside the point, return codes are as old as Unix itself and all shells can use them

It just sets an enviroment variable that anything can look at. I use it a lot in scripting.

dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html

Good luck writing a kernel in anything else (excluding assembly)

Also have fun with shitty language design choices

Cool man tell me about all these kernels you write on a daily basis at your job?