[ 
https://issues.apache.org/jira/browse/THRIFT-1689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459615#comment-13459615
 ] 

Hudson commented on THRIFT-1689:
--------------------------------

Integrated in Thrift #531 (See [https://builds.apache.org/job/Thrift/531/])
    THRIFT-1689: don't exit(-1) in TNonblockingServer
Client: c++
Patch: Brian Fallik

use standard exit(1) instead (Revision 1388019)

     Result = SUCCESS
henrique : http://svn.apache.org/viewvc/?view=rev&rev=1388019
Files : 
* /thrift/trunk/lib/cpp/src/thrift/server/TNonblockingServer.cpp

                
> don't exit(-1) in TNonblockingServer
> ------------------------------------
>
>                 Key: THRIFT-1689
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1689
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.8
>            Reporter: Brian Fallik
>            Assignee: Brian Fallik
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: 1689.patch
>
>
> TNonblockingServer calls exit(-1) when it encounters a std::bad_alloc 
> exception.  The -1 argument to exit() is problematic.  Programs typically use 
> non-zero exit codes since negative values are reserved for signals.  On 
> somewhat modern Linux (CentOS 6.0), exit(-1) causes the process to yield 
> return code 255. which BASH claims is out of range:
>   http://tldp.org/LDP/abs/html/exitcodes.html
> I don't see any advantage to exit(-1) in this case.  If the intent is to exit 
> with an error indication, 1 (or the EXIT_FAILURE macro) should do fine.  If 
> the intent is to signal program termination, possibly with a stack trace, 
> abrt() would be better.
> Attached is a patch for the simplest change from '-1' to '1'.
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to