Added piped process support to Util::Procs
This commit is contained in:
parent
c2df5be19f
commit
499899d405
5 changed files with 101 additions and 23 deletions
|
@ -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
5
spawntest/testpipein.sh
Executable 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
6
spawntest/testpipeout.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Reading stdin..."
|
||||
read meh
|
||||
echo "I read $meh"
|
||||
echo "Exiting pipereader now..."
|
Loading…
Add table
Add a link
Reference in a new issue