/* test2_gnuplot.c just an example of execl to run gnuplot */ #include #include #include int main(int argc, char * argv[]) { int stat; printf("test2_gnuplot.c about to run gnuplot on my2.plot \n"); stat = execl("/usr/bin/gnuplot","gnuplot","-persist","my2.plot", NULL); /* only returns upon error, no return on sucess */ printf("execl failed on gnuplot, stat=%d \n", stat); return 0; }