#include <stdio.h>
#include <unistd.h>

int main()
{
 char *args[]={"/bin/ls",NULL};
 printf("系统分配的进程号是:%d\n",getpid());
 if (execve("/bin/ls",args,NULL)<0)
 {
  printf("创建进程出错\n");
 }
 return 0;
}

相关文章:

  • 2021-12-23
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-11-12
  • 2021-04-24
  • 2021-07-06
猜你喜欢
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案