cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jerome_IA
Level 9

exit code on linux behavior

Hi,

Something I probably misunderstood regarding InstallAnywhere exit code.

I try retrieving installer exit code when I cancel the installer.
According to the documentation, the code should be 1000.

It works well on windows, but I do not get the right one on linux.
After setting LAX_DEBUG to true, it show:

====================================================
...
PRESS TO CONTINUE: quit
SHUTDOWN REQUESTED
(X) commiting registry
(X) shutting down service manager
(X) cleaning up temporary directories
System's temporary directory = /tmp
Exiting with exit code: 1000
cleanUp()
calling cleanUpUNIX()
[root@myhost]# echo $?
232
====================================================

lax_debug well show Exiting with exit code: 1000, but when I test the exit code in my shell, it is 232 ..... any idea why ?

TIA

Jerome
Labels (1)
0 Kudos
(4) Replies
oldmanuk
Level 3

On Linux the maximum range of exit code values is 0 to 255. As per the exit() manpage, only the least significant 8 bits (that is, status & 0377) shall be available to a waiting parent process.

e.g.,

$ bash -c 'exit 255' ; echo $?
255

$ bash -c 'exit 256' ; echo $?
0

Flexera should probably document this.
0 Kudos
oldmanuk
Level 3

So the Installanywhere 2009 exit codes actually map like this on Linux:


0 --> 0 Success: The installation completed successfully without any warnings or errors.
1 --> 1 The installation completed successfully, but one or more of the actions from the installation sequence caused a warning or a non-fatal error.
-1 --> 255 One or more of the actions from the installation sequence caused a fatal error.
1000 --> 232 The installation was cancelled by the user.
1001 --> 233 The installation includes an invalid command line option.
2000 --> 208 Unhandled error.
2001 --> 209 The installation failed the authorization check, may indicate an expired version.
2002 --> 210 The installation failed a rules check. A rule placed on the installer itself failed.
2003 --> 211 An unresolved dependency in silent mode caused the installer to exit.
2004 --> 212 The installation failed because not enough disk space was detected during the execution of the Install action.
2005 --> 213 The installation failed while trying to install on a Windows 64-bit system, but installation did not include support for Windows 64-bit systems.
2006 --> 214 The installation failed because it was launched in a UI mode that is not supported by this installer.
3000 --> 184 Unhandled error specific to a launcher.
3001 --> 185 The installation failed due to an error specific to the lax.main.class property.
3002 --> 186 The installation failed due to an error specific to the lax.main.method property.
3003 --> 187 The installation was unable to access the method specified in the lax.main.method property.
3004 --> 188 The installation failed due to an exception error caused by the lax.main.method property.
3005 --> 189 The installation failed because no value was assigned to the lax.application.name property.
3006 --> 190 The installation was unable to access the value assigned to the lax.nl.java.launcher.main.class property.
3007 --> 191 The installation failed due to an error specific to the lax.nl.java.launcher.main.class property.
3008 --> 192 The installation failed due to an error specific to the lax.nl.java.launcher.main.method property.
3009 --> 193 The installation was unable to access the method specified in the lax.nl.launcher.java.main.method property.
4000 --> 160 A Java executable could not be found at the directory specified by the java.home system property.
4001 --> 161 An incorrect path to the installer jar caused the relauncher to launch incorrectly.
5000 --> 136 Modification of existing instance failed because the instance has not been uninstalled properly or because the Registry has been corrupted.
0 Kudos
jerome_IA
Level 9

Yep, you're totally right ! shame on me 😮

Thanks oldmanuk for clarifying this.

--Jerome
0 Kudos
oldmanuk
Level 3

No problem 🙂
0 Kudos