summaryrefslogtreecommitdiff
path: root/src/process.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
commit393f1b414746a7f1977971dd7659dd2b47092b11 (patch)
tree81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/process.cpp
parentc259f95bd0e58b247940a339bb9b4b401b4e9438 (diff)
parent7e25a863325dc3e9762397e700030969e093b087 (diff)
downloadlibbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically update your projects.
Diffstat (limited to 'src/process.cpp')
-rw-r--r--src/process.cpp37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/process.cpp b/src/process.cpp
index 0e3e93a..8ea6ce3 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -133,7 +133,7 @@ void Bu::Process::close()
133 } 133 }
134} 134}
135 135
136size_t Bu::Process::read( void *pBuf, size_t nBytes ) 136Bu::size Bu::Process::read( void *pBuf, Bu::size nBytes )
137{ 137{
138 if( bStdOutEos ) 138 if( bStdOutEos )
139 return 0; 139 return 0;
@@ -145,7 +145,7 @@ size_t Bu::Process::read( void *pBuf, size_t nBytes )
145 throw Bu::ExceptionBase( strerror( errno ) ); 145 throw Bu::ExceptionBase( strerror( errno ) );
146 if( FD_ISSET( iStdOut, &rfds ) || bBlocking ) 146 if( FD_ISSET( iStdOut, &rfds ) || bBlocking )
147 { 147 {
148 ssize_t nRead = TEMP_FAILURE_RETRY( ::read( iStdOut, pBuf, nBytes ) ); 148 Bu::size nRead = TEMP_FAILURE_RETRY( ::read( iStdOut, pBuf, nBytes ) );
149 if( nRead == 0 ) 149 if( nRead == 0 )
150 { 150 {
151 bStdOutEos = true; 151 bStdOutEos = true;
@@ -163,7 +163,7 @@ size_t Bu::Process::read( void *pBuf, size_t nBytes )
163 return 0; 163 return 0;
164} 164}
165 165
166size_t Bu::Process::readErr( void *pBuf, size_t nBytes ) 166Bu::size Bu::Process::readErr( void *pBuf, Bu::size nBytes )
167{ 167{
168 if( bStdErrEos ) 168 if( bStdErrEos )
169 return 0; 169 return 0;
@@ -175,7 +175,7 @@ size_t Bu::Process::readErr( void *pBuf, size_t nBytes )
175 throw Bu::ExceptionBase( strerror( errno ) ); 175 throw Bu::ExceptionBase( strerror( errno ) );
176 if( FD_ISSET( iStdErr, &rfds ) || bBlocking ) 176 if( FD_ISSET( iStdErr, &rfds ) || bBlocking )
177 { 177 {
178 ssize_t nRead = TEMP_FAILURE_RETRY( ::read( iStdErr, pBuf, nBytes ) ); 178 Bu::size nRead = TEMP_FAILURE_RETRY( ::read( iStdErr, pBuf, nBytes ) );
179 if( nRead == 0 ) 179 if( nRead == 0 )
180 { 180 {
181 bStdErrEos = true; 181 bStdErrEos = true;
@@ -193,25 +193,25 @@ size_t Bu::Process::readErr( void *pBuf, size_t nBytes )
193 return 0; 193 return 0;
194} 194}
195 195
196size_t Bu::Process::write( const void *pBuf, size_t nBytes ) 196Bu::size Bu::Process::write( const void *pBuf, Bu::size nBytes )
197{ 197{
198 return TEMP_FAILURE_RETRY( ::write( iStdIn, pBuf, nBytes ) ); 198 return TEMP_FAILURE_RETRY( ::write( iStdIn, pBuf, nBytes ) );
199} 199}
200 200
201long Bu::Process::tell() 201Bu::size Bu::Process::tell()
202{ 202{
203 return 0; 203 return 0;
204} 204}
205 205
206void Bu::Process::seek( long ) 206void Bu::Process::seek( Bu::size )
207{ 207{
208} 208}
209 209
210void Bu::Process::setPos( long ) 210void Bu::Process::setPos( Bu::size )
211{ 211{
212} 212}
213 213
214void Bu::Process::setPosEnd( long ) 214void Bu::Process::setPosEnd( Bu::size )
215{ 215{
216} 216}
217 217
@@ -278,10 +278,25 @@ void Bu::Process::setBlocking( bool bBlocking )
278 this->bBlocking = bBlocking; 278 this->bBlocking = bBlocking;
279} 279}
280 280
281void Bu::Process::setSize( long ) 281void Bu::Process::setSize( Bu::size )
282{ 282{
283} 283}
284 284
285Bu::size Bu::Process::getBlockSize() const
286{
287 return 0;
288}
289
290Bu::size Bu::Process::getSize() const
291{
292 return 0;
293}
294
295Bu::String Bu::Process::getLocation() const
296{
297 return "";
298}
299
285void Bu::Process::select( bool &bStdOut, bool &bStdErr ) 300void Bu::Process::select( bool &bStdOut, bool &bStdErr )
286{ 301{
287 fd_set rfds; 302 fd_set rfds;