Issue
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?
Solution
Run xterm -e ./paramax arg and more args
, either directly or through an exec call.
Answered By - Davislor Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.