Added piped process support to Util::Procs

This commit is contained in:
Thulinma 2011-10-12 23:30:42 +02:00
parent c2df5be19f
commit 499899d405
5 changed files with 101 additions and 23 deletions

View file

@ -8,8 +8,8 @@
/// Testing program for Util::Proc utility class.
int main(){
Util::Procs::Start("number1", "./test.sh Koekjes");
while (true){
sleep(1);
}
sleep(1); sleep(1); sleep(1); sleep(1); sleep(1);
Util::Procs::Start("number2", "./testpipein.sh", "./testpipeout.sh");
sleep(1); sleep(1); sleep(1); sleep(1); sleep(1);
return 0;
}//main

5
spawntest/testpipein.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
echo "Sending something through the pipe..." 1>&2
echo "something"
echo "Exiting pipewriter" 1>&2

6
spawntest/testpipeout.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
echo "Reading stdin..."
read meh
echo "I read $meh"
echo "Exiting pipereader now..."