[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: io.popen : how to retrieve the return code.
- From: Laurent FAILLIE <l_faillie@...>
- Date: Fri, 13 Jan 2012 16:37:01 -0800 (PST)
Hello,
In php, with exec command you can retrieve both output and return code of a command.
i.e. :
exec($cmd, $output, $rc);
In LUA, the only way I found to retrieve the output of a command is to use io.popen() then io.read() ... but in this case I'm loosing the return code.
How can I retrieve both the output and associated return code ?
Thanks
Laurent