commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DAEMON-306) Service is not restarted when the exit code is non-zero
Date Fri, 18 Oct 2013 07:29:42 GMT

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

Mladen Turk commented on DAEMON-306:
------------------------------------

Think we cannot do that in jni mode because System.exit() calls ExitProcess thus causing procrun
to exit as well. The only way to handle this is by using service control manager.

> Service is not restarted when the exit code is non-zero
> -------------------------------------------------------
>
>                 Key: DAEMON-306
>                 URL: https://issues.apache.org/jira/browse/DAEMON-306
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.15
>         Environment: Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
> Windows Server 2008 R2 Standard
> service created and configurated with automatic restart service as:
> {code}
> sc failure %SERVICE_NAME% reset= 30 actions= restart/5000/restart/10000/restart/60000
> {code}
>            Reporter: antonio castellón
>
> I have a Java application that internally contains a throws, whe it success it trace
and ends the application using:
> {code} System.exit(-1); {code}
> or
> {code} System.exit(1); {code}
> The service is not automatically restarted, I suppose that the procrun application catch
correctly the exit from the java application, but it looks that not inform correctly to the
Services Manager from the O.S.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message