I want to launch a new process from a given string of input (including parameter).
I tried to use system() but it appears that in the child process, getppid() is not the same as the caller in some runs (probably because system uses the shell as command interpreter).
However, if I fork and then use exec(), it is complicated to parse the parameter.
Anyone knows a way to get around this problem? Or is there any library that helps parse a string of input into program parameters like shells often do?
Thank you very much in advance.