我想在MacOS上终止一个进程,但是在kill -9 PID
之后它会立即启动。
发布于 2022-10-07 07:06:44
试着找出这个进程是一个守护进程/服务:sudo launchctl list | grep PROCESS_NAME
如果是这样(很可能),您可以在一些地方找到相关的.plist守护进程文件:
~/Library/LaunchAgents/ - Per-user agents provided by the user.
/Library/LaunchAgents/ - Per-user agents provided by the root.
/Library/LaunchDaemons/ - System-wide daemons provided by the root.
/System/Library/LaunchDaemons/ - System-wide daemons provided by MacOS
/System/Library/LaunchAgents/ - Per-user agents provided by MacOS.
找到相关文件后:
sudo launchctl unload -w /path/to/DAEMON_NAME.plist
现在你可以删除这个文件了。
https://stackoverflow.com/questions/73983571
复制相似问题