WEXITSTATUS returning 254

229 views
Skip to first unread message

Girish Bopaiah

unread,
Sep 23, 2014, 2:10:38 AM9/23/14
to inside...@googlegroups.com
Hi All,

Please let me know what is the meaning of exit status 254. 
i am getting this error status

ret  = WEXITSTATUS(system( "inux shell cmd"))
ret value is 254.
May i know for what reasons exit status can be 254

--
Regards,
Girish

pradipta

unread,
Sep 23, 2014, 2:23:27 AM9/23/14
to inside...@googlegroups.com
HI Girish,

Check the following link which explains the return value meaning.

http://stackoverflow.com/questions/808541/any-benefit-in-using-wexitstatus-macro-in-c-over-division-by-256-on-exit-statu

Thanks,
Pradipta
--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anil Kumar Pugalia

unread,
Sep 23, 2014, 2:26:12 AM9/23/14
to inside...@googlegroups.com
Assign the return value to status & Check the value of status & WIFEXITED(status) before using the macro below. Read "man 2 wait" for more details.

-Anil
Passion: http://sysplay.in (Playing with Systems)

Girish Bopaiah said the following on Tuesday 23 September 2014 11:40 AM:

Girish Bopaiah

unread,
Sep 24, 2014, 12:57:29 AM9/24/14
to inside...@googlegroups.com
Thanks Anil and Pradipta.

--
Regards,
Girish
Reply all
Reply to author
Forward
0 new messages