My code is as follows to open a xterm terminal and run the ./paramax executable
#include <unistd.h>
#include <sys/ipc.h>
int main(int argc, char* argv[])
{
execl("/usr/bin/xterm", "/usr/bin/xterm", "-hold", "./paramax", (void*)NULL);
return 0;
}
Now the problem is for ./paramax I need to give a commandline argument for it to execute. How to proceed with this?
Run xterm -e ./paramax arg and more args
, either directly or through an exec call.