Use of system function call in Neutrino


I am using Neutrino 6.4.1 for my development.
I am planning to use shell commands in my C code.
I intend to use the system() function call for the same, but i am not so sure about the return value of the system call.

Any idea if i can use some other function to achieve the same purpose with reliable and deterministic behaviour.

It would also be useful if someone can guide me to source code of system() function call in Neutrino.


Iā€™m fairly sure that it returns the return code of the program you start, unless you run the program with an ā€˜&ā€™.
You can easily test this.

Otherwise you probably want to look at the spawn family of calls.