aboutsummaryrefslogtreecommitdiff
path: root/src/tests/procs.cpp
blob: 53e5142351fe37dad1e977ab0f10d8e65a03e852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "bu/process.h"

#include <stdio.h>

int main( int agrc, char *argv[] )
{
	Bu::Process p( argv[1], argv+1 );

	char buf[1000];
	for(;;)
	{
		int iSize = p.read( buf, 1000 );
		if( iSize == 0 )
			break;
		fwrite( buf, iSize, 1, stdout );
		if( iSize < 1000 )
			break;
	}

	return 0;
}