mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
refine code, unify the coding style
This commit is contained in:
parent
74cb41469c
commit
8295169e0e
1 changed files with 5 additions and 5 deletions
|
@ -97,15 +97,15 @@ int run()
|
||||||
|
|
||||||
int pid = fork();
|
int pid = fork();
|
||||||
|
|
||||||
if(pid == -1){
|
if(pid == -1) {
|
||||||
srs_error("create process error. ret=-1"); //ret=0
|
srs_error("create process error. ret=-1"); //ret=0
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// grandpa
|
// grandpa
|
||||||
if(pid > 0){
|
if(pid > 0) {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
if(waitpid(pid, &status, 0) == -1){
|
if(waitpid(pid, &status, 0) == -1) {
|
||||||
srs_error("wait child process error! ret=-1"); //ret=0
|
srs_error("wait child process error! ret=-1"); //ret=0
|
||||||
}
|
}
|
||||||
srs_trace("grandpa process exit.");
|
srs_trace("grandpa process exit.");
|
||||||
|
@ -116,12 +116,12 @@ int run()
|
||||||
// father
|
// father
|
||||||
pid = fork();
|
pid = fork();
|
||||||
|
|
||||||
if(pid == -1){
|
if(pid == -1) {
|
||||||
srs_error("create process error. ret=-1");
|
srs_error("create process error. ret=-1");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pid > 0){
|
if(pid > 0) {
|
||||||
srs_trace("father process exit. ret=-1");
|
srs_trace("father process exit. ret=-1");
|
||||||
exit(0);
|
exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue