+ alarm(timeout);
+}
+
+
+static void close_unwanted_pipes(void) {
+ int fd;
+
+ for (fd=0; fd<fdsetupsize; fd++) {
+ if (!fdsetup[fd].filename) continue;
+ if (close(fdsetup[fd].pipefd)) fsyscallerror("close pipe fd for %d",fd);
+ if (fdsetup[fd].copyfd>2)
+ if (close(fdsetup[fd].copyfd))
+ if (errno != EBADF)
+ /* EBADF can be induced if cmd line specifies same fd twice */
+ fsyscallerror("close real fd for %d",fd);
+ }