<p dir="ltr">On Jun 12, 2015 7:21 AM, "Grawburg" <<a href="mailto:grawburg@myglnc.com">grawburg@myglnc.com</a>> wrote:<br>
><br>
> I have a piece of code written for a Raspberry Pi with no explanation for two of the lines -- and I can't find an explanation I understand.<br>
><br>
> Here are the lines:<br>
> if os.system('modprobe --first-time -q w1_gpio') ==0<br>
><br>
> if os.system('modprobe -q w1_gpio') == 256:<br>
><br>
><br>
><br>
> I know what the 'modprobe...' is, it's the 0 and the 256 I don't get. Where do these numbers come from?<br>
> I recognize they're some kind of error returns, but don't know what they mean.</p>
<p dir="ltr">Exit code 0 traditionally means success. The exit status is two bytes, with the low-order byte normally containing the exit code and the high-order byte containing the signal that caused the program to exit. So 256 would appear to mean that modprobe exited due to SIGHUP, although that seems an odd thing to test for here so I may be wrong.</p>