mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
精简代码
This commit is contained in:
parent
d27a8117e1
commit
0e9d8df2d0
@ -143,7 +143,7 @@ static bool s_wait(pid_t pid,int *exit_code_ptr,bool block) {
|
|||||||
pid_t p = waitpid(pid, &status, block ? 0 : WNOHANG);
|
pid_t p = waitpid(pid, &status, block ? 0 : WNOHANG);
|
||||||
int exit_code = (status & 0xFF00) >> 8;
|
int exit_code = (status & 0xFF00) >> 8;
|
||||||
if (exit_code_ptr) {
|
if (exit_code_ptr) {
|
||||||
*exit_code_ptr = (status & 0xFF00) >> 8;
|
*exit_code_ptr = exit_code;
|
||||||
}
|
}
|
||||||
if (p < 0) {
|
if (p < 0) {
|
||||||
WarnL << "waitpid failed, pid=" << pid << ", err=" << get_uv_errmsg();
|
WarnL << "waitpid failed, pid=" << pid << ", err=" << get_uv_errmsg();
|
||||||
|
Loading…
Reference in New Issue
Block a user