Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Cluster Support
 exit status codes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aawineco
Junior Member

USA
31 Posts

Posted - Feb 01 2008 :  09:35:14 AM  Show Profile  Reply with Quote
Is there a location where the meaning of the exit status codes are listed? My email noted that exit status = 2. No log file was created. Since I don't know what this means, I don't really know how to debug it.

Thanks,

Amy

aawineco
Junior Member

USA
31 Posts

Posted - Feb 01 2008 :  09:50:09 AM  Show Profile  Reply with Quote
found it:

Exit codes are a number between 0 and 256, which is returned by any Unix command when it returns control to its parent process.
Other numbers can be used, but these are treated modulo 256, so exit -10 is equivalent to exit 246, and exit 257 is equivalent to exit 1.
These can be used within a shell script to change the flow of execution depending on the success or failure of commands executed.

Success is traditionally represented with exit 0; failure is normally indicated with a non-zero exit-code. This value can indicate different reasons for failure.
For example, GNU grep returns 0 on success, 1 if no matches were found, and 2 for other errors (syntax errors, nonexistant input files, etc).
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.62 seconds. Snitz Forums 2000