run() vs. runShellCommand()

Any comments about when to use one over the other ?
Thanks !

When you need output redirection/filtering/piping in general. Take a look at ShellCommands example: you can't do that filtering (printing only the Signal strength of wifi) using addParameter

Ok, I see. Thanks.
Another question; from the shell commands example I see :
...
Process p;
p.runShellCommand("/usr/bin/pretty-wifi-info.lua | grep Signal");
// do nothing until the process finishes, so you get the whole output:
while(p.running());
...

If runShellCommand() is blocking, what is the point of the while loop ? It seems that p.running() will never be true after runShellCommand() returns.