views:

114

answers:

2

Here is the confusing page. Search for "/bin/ps". The line is:

ProcessHandle ph(launch("/bin/ps", args, &outPipe, 0, 0));

Shouldnt it be:

ProcessHandle ph(launch("/bin/ps", args, 0, &outPipe, 0));

?

+2  A: 

Yes, your observation is confirmed - the order of the last three args is indeed stdin, stdout, stderr, so the outPipe in the docs is erroneously getting passed as the input instead. I have no more idea than you have, how this doc error may have gone unnoticed!-)

Alex Martelli
Thanks. I think that people might just NOT read documentation. :)
Łukasz Lew
...or at least not with as much focused attention as you put into it, @Łukasz -- it does take such focus to notice that subtle error in argument ordering which you spotted!-)
Alex Martelli
A: 

This will be fixed in 1.3.6.

obiltschnig