Make the last fix work properly on descriptors 1 and 2 (not just 0)

This commit is contained in:
Brian Somers 2001-07-04 09:32:34 +00:00
parent 3d09a65d42
commit dd1a52b9e4

View File

@ -311,7 +311,7 @@ main(int argc, char **argv)
return 2;
}
for (f = 1; f < sizeof holdfd / sizeof *holdfd; f++)
dup2(holdfd[0], holdfd[f]);
holdfd[f] = dup(holdfd[0]);
name = strrchr(argv[0], '/');
log_Open(name ? name + 1 : argv[0]);