ChinaUnix.net
相关文章推荐:

linux execlp

如果我想一边下载网站地址(源代码),一边对网站代码进行查询分析。比如在网站www.youku.com.具体应该用到fork,wget,execlp,等一些指令或涵数,具体我也不肯定。希望各位大哥我帮下我,具体怎么写,最好就详细点(对网站进行查询分析就不用了)。谢谢。 小弟决定是linux的新手,我现在用linux的C语言做在线视频程序开发,如果你有这样的例子,希望你可以发给我,邮箱:[email]huangyongheng911@126.com[/email]。跪谢了~~~

by dream19850911 - Linux新手园地 - 2008-12-04 18:38:33 阅读(1444) 回复(2)

相关讨论

execlp: 1)如果filename(即第一个参数)中包含了"/",则将其视为路径名,如果不包含,则在环境变量PATH中查看filename 2) 找到filename后便执行该文件,然后将第二个以后的参数当做该文件的argv[0] execlp ("ls", "-al", (char *)0); filename arg0 arg1 argv[0] argv[1] 所以没有参数 不过这样子把argv[0] 的内容改掉了, 一般的main函数,argv[0]是可执行文件名, 所以按习惯应该是像 execlp("l...

by cssjtuer - Linux文档专区 - 2009-09-07 16:34:02 阅读(800) 回复(0)

exec系列函数中 int execlp(const char *filename,char *const arg0,...(char *)0 ) arg0参数起什么作用 实际程序中 execlp("iptables","","-t","nat","-L",NULL) 和execlp("iptables","iptables","-t","nat","-L",NULL)的效果是一样的

by kingld - C/C++ - 2003-12-20 11:43:50 阅读(1194) 回复(2)

在一个for循环中执行了 execlp("ls", " -al ", "/tmp/", NULL); 为什么只执行了一次程序就终止,跳出了? 请问一下execlp的返回值是怎样的?

by daniel_kohler - C/C++ - 2010-01-27 16:34:09 阅读(2781) 回复(7)

请问: 1. 当发布一个execlp调用时,系统用什么值去生成一个系统进程表项? 2. 是否可以通过file argv引用此表项? 谢谢。

by cores - C/C++ - 2009-11-02 09:38:50 阅读(1447) 回复(1)

system 函数和有同等机能的函数(mysystem)的示例。 execlp(execvp,..)函数一实行参数的命令和指定参数就将执行,但是执行后,相应程序将终止。 如果想在其执行后,仍继续进行程序处理动作,就要通过fork生成子进程,在那个子进程内执行execlp等命令。execlp函数执行结束后,即使子进程终了后,其父进程仍然能够继续执行相应处理。 execlp 函数中,用通常的shell执行pipe和Redirection处理( | etc.)和通过正规表现(? * etc.)不...

by bo_00 - Linux文档专区 - 2009-07-10 22:40:02 阅读(2310) 回复(0)

#include #include #include #define Ports 3306 main() { struct sockaddr_in server; int socked,port; server.sin_family=AF_INET; server.sin_addr.s_addr=htonl(INADDR_ANY); server.sin_port = htons((short)Ports); socked=socket(AF_INET,SOCK_STREAM,0); port=bind(socked,(struct sockaddr *)&server,sizeof(server)); if (port==0) { execlp("mysql.server","m...

by 修理工 - C/C++ - 2007-12-15 09:33:52 阅读(1726) 回复(0)

#include #include #include #define Ports 3306 main() { struct sockaddr_in server; int socked,port; server.sin_family=AF_INET; server.sin_addr.s_addr=htonl(INADDR_ANY); server.sin_port = htons((short)Ports); socked=socket(AF_INET,SOCK_STREAM,0); port=bind(socked,(struct sockaddr *)&server,sizeof(server)); if (port==0) { execlp("mysql.server","m...

by 修理工 - C/C++ - 2007-12-14 01:47:10 阅读(1463) 回复(1)

#include #include #include #include int main(void) { pid_t childpid; childpid = fork(); if (childpid == -1) { perror("Failed to fork"); return 1; } if (childpid == 0) { /* child code */ execl("/bin/cat","/bin/cat","/etc/passwd","|","more", NULL); perror("Child failed to exec ls");...

by linuxcici - C/C++ - 2006-03-15 19:51:23 阅读(1542) 回复(7)

在程序中调用execlp("/root/a","a","/b.bin",(char *)0);当这个函数执行完毕了如何让它再次执行?请赐教!谢谢!

by yueying - C/C++ - 2007-01-06 16:42:03 阅读(1251) 回复(3)

#include #include #include #include #include #include #include #define MAXLINE 50 int main(void) { char buf[MAXLINE]; pid_t pid; int status,i; // char lsargv[] ={“ls”,”-l”, 0}; // char lsenvp[] ={“PATH=/bin:/usr/bin”, 0}; printf("Now it is before fork ...

by declare - C/C++ - 2006-07-19 10:01:08 阅读(2154) 回复(4)