This commit is contained in:
Maxim Konovalov 2004-09-24 13:22:45 +00:00
parent 40e677651c
commit 6d4a0e75fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135738

View File

@ -504,13 +504,13 @@ main(int argc, char *argv[], char **envp)
(struct sockaddr *)&his_addr,
&addrlen);
if (fd >= 0) {
if ((pid = fork()) == 0) {
/* child */
(void) dup2(fd, 0);
(void) dup2(fd, 1);
close(ctl_sock[i]);
} else
close(fd);
if ((pid = fork()) == 0) {
/* child */
(void) dup2(fd, 0);
(void) dup2(fd, 1);
close(ctl_sock[i]);
} else
close(fd);
}
}
if (pid == 0)