SCCS-vsn: bin/csh/glob.c 5.36
-static char sccsid[] = "@(#)glob.c 5.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)glob.c 5.36 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
fakecom[0] = STRfakecom1;
fakecom[1] = 0;
fakecom[0] = STRfakecom1;
fakecom[1] = 0;
+ if (didfds == 0) {
+ /*
+ * Make sure that we have some file descriptors to
+ * play with, so that the processes have at least 0, 1, 2
+ * open
+ */
+ (void) dcopy(SHIN, 0);
+ (void) dcopy(SHOUT, 1);
+ (void) dcopy(SHERR, 2);
+ }
+
/*
* We do the psave job to temporarily change the current job so that the
* following fork is considered a separate job. This is so that when
/*
* We do the psave job to temporarily change the current job so that the
* following fork is considered a separate job. This is so that when