I use the system() command in C to execute commands like sc query mysql or net start mysql .
If the parameter has a null pointer, it returns 1, if the cmd processor is OK, otherwise it returns 0. If the command succeeds, it returns 0.
My question is: can I get a list of return values? How is it that it will return if the command is invalid or what will be the return value if it fails? I want to do different things depending on the return value of system() .
source share