linux - Calling shell script from C++ -
linux - Calling shell script from C++ -
a shell script test.sh called c++ code command execl("/system/bin/sh","sh","test.sh")
after execution of shell script need command c++, shell script exiting not executing next instructions in c++ code
you want utilize fork
create kid process before exec
:
pid_t pid; if((pid = fork()) > 0) execl("/system/bin/sh","sh","test.sh"); int status; waitpid(pid, &status, 0); // wait kid process, test.sh, finish
linux bash shell
Comments
Post a Comment