if ((child = vfork ()) == 0)
{
/* Child process code. */
+ int nulloutfd;
+
if (dup2 (ofd[0], STDIN_FILENO) >= 0
&& dup2 (ifd[1], STDOUT_FILENO) >= 0
&& close (ofd[0]) >= 0
if ((child = vfork ()) == 0)
{
/* Child process code. */
- int stdinfd;
int nulloutfd;
+ int stdinfd;
if (dup2 (ifd[1], STDOUT_FILENO) >= 0
&& close (ifd[1]) >= 0
if ((child = vfork ()) == 0)
{
/* Child process code. */
+ int nulloutfd;
int stdoutfd;
if (dup2 (ofd[0], STDIN_FILENO) >= 0
error (EXIT_FAILURE, errno, _("%s subprocess failed"), progname);
else
{
- close (ifd[0]);
- close (ifd[1]);
+ close (ofd[0]);
+ close (ofd[1]);
return -1;
}
}