aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-12-17 18:58:06 +0000
committerMike Buland <eichlan@xagasoft.com>2007-12-17 18:58:06 +0000
commitf557c2789239ae3c6334d8f60748a357cb9a20ac (patch)
treed88a867b3206fb5bf3a25f32b28238bd39002647
parent7eb00b6d3037a7e30c326b43e23502f777b92eb6 (diff)
downloadlibbu++-f557c2789239ae3c6334d8f60748a357cb9a20ac.tar.gz
libbu++-f557c2789239ae3c6334d8f60748a357cb9a20ac.tar.bz2
libbu++-f557c2789239ae3c6334d8f60748a357cb9a20ac.tar.xz
libbu++-f557c2789239ae3c6334d8f60748a357cb9a20ac.zip
I think it doesn't open or connect stderr in this version, I need to add some
options...
Diffstat (limited to '')
-rw-r--r--src/process.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/process.cpp b/src/process.cpp
index 719996b..0724159 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -48,14 +48,14 @@ void Bu::Process::gexec( const char *sName, char *const argv[] )
48{ 48{
49 int iaStdIn[2]; 49 int iaStdIn[2];
50 int iaStdOut[2]; 50 int iaStdOut[2];
51 int iaStdErr[2]; 51// int iaStdErr[2];
52 pipe( iaStdIn ); 52 pipe( iaStdIn );
53 pipe( iaStdOut ); 53 pipe( iaStdOut );
54 pipe( iaStdErr ); 54// pipe( iaStdErr );
55 55
56 iStdIn = iaStdIn[1]; 56 iStdIn = iaStdIn[1];
57 iStdOut = iaStdOut[0]; 57 iStdOut = iaStdOut[0];
58 iStdErr = iaStdErr[0]; 58// iStdErr = iaStdErr[0];
59 59
60// fcntl( iStdOut, F_SETFL, fcntl( iStdOut, F_GETFL, 0 )|O_NONBLOCK ); 60// fcntl( iStdOut, F_SETFL, fcntl( iStdOut, F_GETFL, 0 )|O_NONBLOCK );
61 61
@@ -64,15 +64,15 @@ void Bu::Process::gexec( const char *sName, char *const argv[] )
64 { 64 {
65 ::close( iaStdIn[1] ); 65 ::close( iaStdIn[1] );
66 ::close( iaStdOut[0] ); 66 ::close( iaStdOut[0] );
67 ::close( iaStdErr[0] ); 67// ::close( iaStdErr[0] );
68 dup2( iaStdIn[0], 0 ); 68 dup2( iaStdIn[0], 0 );
69 dup2( iaStdOut[1], 1 ); 69 dup2( iaStdOut[1], 1 );
70 dup2( iaStdErr[1], 2 ); 70// dup2( iaStdErr[1], 2 );
71 execvp( sName, argv ); 71 execvp( sName, argv );
72 } 72 }
73 ::close( iaStdIn[0] ); 73 ::close( iaStdIn[0] );
74 ::close( iaStdOut[1] ); 74 ::close( iaStdOut[1] );
75 ::close( iaStdErr[1] ); 75// ::close( iaStdErr[1] );
76} 76}
77 77
78void Bu::Process::close() 78void Bu::Process::close()