mirror of https://github.com/omar-polo/gmid.git
drop unnecessary check around close
This commit is contained in:
parent
4e2e2ab1d3
commit
e824d03efa
10
gmid.c
10
gmid.c
|
@ -490,20 +490,14 @@ serve(int argc, char **argv, int *p)
|
|||
fatal("fork: %s", strerror(errno));
|
||||
|
||||
case 0: /* child */
|
||||
if (p[0] != -1) {
|
||||
close(p[0]);
|
||||
p[0] = -1;
|
||||
}
|
||||
close(p[0]);
|
||||
exfd = p[1];
|
||||
drop_priv();
|
||||
listener_main();
|
||||
_exit(0);
|
||||
|
||||
default: /* parent */
|
||||
if (p[1] != -1) {
|
||||
close(p[1]);
|
||||
p[1] = -1;
|
||||
}
|
||||
close(p[1]);
|
||||
exfd = p[0];
|
||||
drop_priv();
|
||||
return executor_main();
|
||||
|
|
Loading…
Reference in New Issue