我正在尝试使用pkill
和触发 Nginx 主进程的重新加载sudo
。
服务器重新加载正常,但我很好奇是否有人知道为什么该命令sudo pkill -HUP -f "nginx: master process"
返回代码 129?
# Running as root
$ pkill -HUP -f "nginx: master process"
$ echo $?
# Output is as expected:
0
# Running as a user (sudo is set to not prompt for a password)
% sudo pkill -HUP -f "nginx: master process
% echo $?
# Output is weird (considering sudo should be passing along the return
# code of the command it …
Run Code Online (Sandbox Code Playgroud)