[uim-commit] r2274 - trunk/uim
yamamoto at freedesktop.org
yamamoto at freedesktop.org
Tue Nov 29 05:17:02 PST 2005
Author: yamamoto
Date: 2005-11-29 05:16:58 -0800 (Tue, 29 Nov 2005)
New Revision: 2274
Modified:
trunk/uim/uim-ipc.c
Log:
* uim/uim-ipc.c
- (open_pipe_rw): Grand child close pipe_fd[0,1] before dup2 because if
pipe_fd[0,1] contains 0 or 1, executed process losts stdin or
stdout.
Modified: trunk/uim/uim-ipc.c
===================================================================
--- trunk/uim/uim-ipc.c 2005-11-29 03:40:53 UTC (rev 2273)
+++ trunk/uim/uim-ipc.c 2005-11-29 13:16:58 UTC (rev 2274)
@@ -91,6 +91,8 @@
_exit(0);
} else {
/* grand child */
+ close(pipe_fd[0]);
+ close(pipe_fd[1]);
if (fr) {
close(fdr[0]);
dup2(fdr[1], 1);
@@ -99,8 +101,6 @@
close(fdw[1]);
dup2(fdw[0], 0);
}
- close(pipe_fd[0]);
- close(pipe_fd[1]);
}
return 0;
}
More information about the uim-commit
mailing list