#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

int main(int c, char **v)
{
  while (--c > 1 && !fork());
  sleep(c = atoi(v[c]));
  printf("%d\n", c);
  wait(0);
  return 0;
}

  

相关文章:

  • 2022-12-23
  • 2021-12-23
  • 2021-08-19
  • 2021-06-16
  • 2021-11-26
  • 2022-12-23
  • 2021-11-01
  • 2021-11-16
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2021-06-10
  • 2021-12-09
  • 2019-05-23
  • 2021-10-18
相关资源
相似解决方案