Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92527
| From | random832@fastmail.us |
|---|---|
| References | <2ebdfdf225c075b2f5ef350b06bc14f0@myglnc.com> <CALwzidk4RoM0owVcWWYGGVUzsGbYWvGzyLXMh=YixDA+sa1xqQ@mail.gmail.com> |
| Subject | Re: os.system error returns |
| Date | 2015-06-12 10:25 -0400 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.425.1434119131.13271.python-list@python.org> (permalink) |
On Fri, Jun 12, 2015, at 09:54, Ian Kelly wrote: > 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. That's backwards. The signal (or 0 for a normal exit, or 0177 if the process is stopped) is in the low seven bits of the low-order byte, the core dump flag is in the high bit of the low-order byte and the exit status or the stop signal is in the high-order byte. I think you're confused because the _shell_ puts the exit status, or the signal plus 128, in the $? variable, and many languages (but not python) follow suit.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: os.system error returns random832@fastmail.us - 2015-06-12 10:25 -0400
csiph-web