Questions tagged «pidof»

3
为什么pidof和pgrep的行为有所不同?
我有一个初始化脚本,/etc/init.d/myservice用于初始化这样的服务: ... start() { ... daemon /usr/sbin/myservice ... } stop() { ... pgrep myservice pidof myservice ps -ef | grep myservice ... } 当我尝试停止该服务时,这是输出: 10000 10001 10000 root 10000 1 0 09:52 ? 00:00:02 /usr/sbin/myservice root 9791 9788 0 10:06 pts/1 00:00:00 /bin/sh /sbin/service myservice stop root 10001 9791 1 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.