copy_and_spawn_sgid: Avoid double calls to close()
If close() on infd and outfd succeeded, reset the fd numbers so that we don't attempt to close them again. Reviewed-by: Arjun Shankar <arjun@redhat.com>
This commit is contained in:
parent
1e0e6d656d
commit
45caed9d67
|
@ -170,6 +170,7 @@ copy_and_spawn_sgid (char *child_id, gid_t gid)
|
|||
support_subprogram because we only want the program exit status, not the
|
||||
contents. */
|
||||
ret = 0;
|
||||
infd = outfd = -1;
|
||||
|
||||
char * const args[] = {execname, child_id, NULL};
|
||||
|
||||
|
|
Loading…
Reference in a new issue