Author Topic: [fixed] r3455: Linux exit codes are misleading  (Read 755 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
[fixed] r3455: Linux exit codes are misleading
« on: 15 July 2012, 17:02:54 »
When I run MegaGlest with just --version and it does not seem to run into an error condition, I'd expect its exit code to be 0. However, the exit code is 255:

Code: [Select]
tomreyn@atibox:~/SCM/megaglest-trunk$ mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/ --version; echo $?
megaglest v3.6.1-dev
Compiled using: GNUC: 40603 [64bit] on: Jul 15 2012 18:47:45
SVN: [Rev: 3455M] - using STREFLOP [SSE] - [no-denormals]
255

If a segmentation fault occurs it seems to return exit code 254 instead.

The start_megaglest wrapper script did not return any error codes whatsoever so far. This issue is fixed in 3456, but the misleading exit codes the binary produces need yet to be looked into.
« Last Edit: 19 July 2012, 00:49:38 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3455: Linux exit codes are misleading
« Reply #1 on: 19 July 2012, 00:49:22 »
Softcoder kindly fixed this in r3466.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·