linux ps查看进程命令ps命令作用:将某个时间点的程序运作情况撷取下来 实例: [root@linux ~]# ps aux [root@linux ~]# ps -lA [root@linux ~]# ps axjf 参数: -A :所有的 process 均显示出来,与 -e 具有同样的效用: -a :不与 terminal 有关的所有 process : -u :有效使用者 (effective user) 相关的 process : x :通常与 a 这个参数一起使用,可列出较完整
long add(long x,long y) { pid_t fpid; //fpid表示fork函数返回的值 int count=0; fpid=fork(); if (fpid < 0) LOGI("error in fork!"); else if (fpid == 0) { LOGI("i am the child process, my process id is %d/n",getpid()); count++; return x; } else