Fixed and tested piped process support, first version of main DDV_Controller application

This commit is contained in:
Thulinma 2011-10-15 05:27:36 +02:00
parent 499899d405
commit 516a91e37c
4 changed files with 236 additions and 32 deletions

View file

@ -5,11 +5,22 @@
#include <string>
#include "../util/proc.h" //Process utility
/// Sleeps a maximum of five seconds, each second being interruptable by a signal.
void sleepFive(){
sleep(1); sleep(1); sleep(1); sleep(1); sleep(1);
}
/// Testing program for Util::Proc utility class.
int main(){
Util::Procs::Start("number1", "./test.sh Koekjes");
sleep(1); sleep(1); sleep(1); sleep(1); sleep(1);
sleepFive();
Util::Procs::Start("number2", "./testpipein.sh", "./testpipeout.sh");
sleep(1); sleep(1); sleep(1); sleep(1); sleep(1);
sleepFive();
Util::Procs::Start("number3", "./infitest.sh");
sleepFive();
Util::Procs::Stop("number3");
Util::Procs::Start("number4", "./infitest.sh", "./testpipeout.sh");
sleepFive();
Util::Procs::Stop("number4");
return 0;
}//main