[code 小心得]run script



#include #include int main() { pid_t pid; pid = fork(); if(pid < 0){ printf("fail to fork\n"); exit(1); }else if(pid == 0){ /*use excel function,commend line parmeter use NULL for end. this porgram use three parmeter,the first is file name */ execl("/home/dai-pc/interp.sh", "interp", "arg1", "arg2", NULL); exit(0); } exit(0); }

留言