[Interest] Return value from QProcess

Thiago Macieira thiago.macieira at intel.com
Wed Apr 6 19:22:32 CEST 2016


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.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list