This fixes a hang of the testcase when hitting an error in the child (e.g.
localdir does not exist)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 16 21:52:13 CET 2018 on sn-devel-144
char c;
/* Parent. */
TALLOC_FREE(name);
+ close(fds[1]);
ret = sys_read(fds[0], &c, 1);
torture_assert(tctx, ret == 1, "read failed");
return true;
}
/* Child process. */
+ close(fds[0]);
ret = do_child_process(fds[1], name);
_exit(ret);
/* Notreached. */