我目前在OS/X上使用macbook。我想停止mongodb服务的实例运行。因此,我尝试了:sudo: service: command not found> `vim ~/.bash_profile` (created a new bash_profile) and added the following there:
export PATH=/usr/bin:/usr/sbin:/bin:/usr/local/bin:/sbin:/opt/x11/bi
因此,给定一个传递给系统调用的进程id,我需要返回所有子进程id。这必须是用C写的。我用mproc得到了一个子进程pid的父进程,并列出了某个索引中的所有进程,但我不能从那个跳到这个。pid of this process
printf("Child pid for ppid %d is %d\n",int idx = 0;
int