summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libirc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libirc.c b/libirc.c
index a69e020..05a682f 100644
--- a/libirc.c
+++ b/libirc.c
@@ -40,8 +40,8 @@ int serverConnect(char *serv,char *port) {
name[2]=0;
socketpair(PF_LOCAL,SOCK_STREAM,0,s);
if(!(pid=fork())) {
- dup2(s[1],0);
- dup2(s[1],1);
+ dup2(s[1],fileno(stdin));
+ dup2(s[1],fileno(stdout));
execv(name[0],name);
}
if(pid == -1) return -1;