On 06/04/2016 1:22 PM, Thiago Macieira wrote:
On quarta-feira, 6 de abril de 2016 08:47:58 PDT Thiago Macieira wrote:
On quarta-feira, 6 de abril de 2016 10:47:39 PDT Duane wrote:
This works in the sense that it returns 0 when there's no error but it
doesn't seem to return the return value from insmod.  For example,
insmod returns 4531 when the file is already loaded but
QProcess::exitCode is 17.  I can rmmod module I guess.

The error code cannot be 4531. There aren't enough bits in the kernel
structure that returns status codes.

/* If WIFEXITED(STATUS), the low-order 8 bits of the status.  */
#define __WEXITSTATUS(status)   (((status) & 0xff00) >> 8)

BTW

$ printf %x\\n 4531
11b3

0x11 is 17. So QProcess is correct.



Thanks.  Actually 4531 was a typo.  It returns 4352 which is 1100.
So that explains it. std::system is returning it as an int. But then again, QProcess::exitCode() is supposed to be returning it as an int as well...

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to