系统编程之进程管理 execl
来源:互联网 发布:python 变量写入文件 编辑:程序博客网 时间:2024/05/02 01:27
#include<unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char * argv[])
{
/*判断入参有没有传入文件名*/
if(argc < 2)
{
perror("you haven't input the filename,please try again!\n");
exit(EXIT_FAILURE);
}
/*调用execl函数,用于可执行程序touch替代本进程,除了进程号,都没有了*/
if( execl("/bin/touch","touch",argv[1],NULL) < 0)
perror("execl error!");
return 0;
}
/* int execl(const char *path, const char *arg, ...);
*/
- 系统编程之进程管理 execl
- linux系统编程之进程(五):exec系列函数(execl,execlp,execle,execv,execvp)使用
- 系统编程之进程管理 wait()
- 系统编程之进程管理 pipe
- 系统编程之进程管理 fork—pid
- 系统编程之进程管理 vfork—pid
- 系统编程之进程篇
- 系统编程之进程控制
- linux系统编程之进程
- linux 系统编程——进程管理
- Linux系统编程——进程管理
- 【Linux系统编程】Linux进程管理
- linuxC系统编程——进程管理
- 系统编程之进程与进程
- 每日编程27之linux系统调用——进程管理
- linux系统基本命令之进程管理
- linux进程编程(三)-- execl()函数使用
- Windows系统编程之进程间通信
- JMS消息机制--发布-订阅模式
- HDU 1170 Balloon Comes!
- 一个华为人在华为工作十年的感悟
- wpdb函数
- 让你一夜之间精通JavaScript
- 系统编程之进程管理 execl
- 11.求二叉树中节点的最大距离
- 那款导航仪好品牌导航仪推荐
- win 7 管理员权限运行批处理的几种方法
- Tomcat部署Web应用方法总结
- HDU 1178 Heritage from father
- MFC 设置焦点按钮
- Adobe Reader XI v11
- 选择排序法