- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Whats is exit code 255?
Operating System - HP-UX
1819803
Members
2865
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 01:07 PM
тАО05-30-2003 01:07 PM
Whats is exit code 255?
Hi,
We have C program running 24 hours. It exits with exit code 255. It is general exit code
i.e 255-128 = 127. Anybody know what is exact meaning of exit code 255/127? Is there any way to find out why process intermittently exiting with this code?
We have C program running 24 hours. It exits with exit code 255. It is general exit code
i.e 255-128 = 127. Anybody know what is exact meaning of exit code 255/127? Is there any way to find out why process intermittently exiting with this code?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 01:13 PM
тАО05-30-2003 01:13 PM
Re: Whats is exit code 255?
If I were forced to guess, I would say that the code actually exited (or returned from main()) with -1 (0xFFFF). Which to the shell (limited to 8 bits) looks like 255.
The convention is for the program to exit with 0 (good) or errno (bad) but your giy didn't do that. The bottom line is that the returned result means just what the programmer intended - nothing more or nothing less.
The convention is for the program to exit with 0 (good) or errno (bad) but your giy didn't do that. The bottom line is that the returned result means just what the programmer intended - nothing more or nothing less.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 01:19 PM
тАО05-30-2003 01:19 PM
Re: Whats is exit code 255?
Hi,
I forgot to mention, This process exits with 255 is a child process. The child sending 255 exit code to parent ( SIGCHLD handler ) and parent printing this number. We get exit code in SIGCHLD handler as below
child_hdlr()
{
process = wait(&status);
exit_code=WEXITSTATUS( status );
}
I forgot to mention, This process exits with 255 is a child process. The child sending 255 exit code to parent ( SIGCHLD handler ) and parent printing this number. We get exit code in SIGCHLD handler as below
child_hdlr()
{
process = wait(&status);
exit_code=WEXITSTATUS( status );
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2003 01:52 PM
тАО05-30-2003 01:52 PM
Re: Whats is exit code 255?
I now see your problem. You are putting the wait inside a SIGCHLD signal handler. At that point the child has already exited so the wait() system call isn't waiting on anything.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP