As I understand pclose will return 0 (on every platform) in case popen could not execute the specified command.
Since popen only returns the status wether it was able to send a command and not wether it was succesfully executed. Only the returned value of pclose can be used to check wether a command could be executed.