Hello Thomas,

I can't help you right away, but maybe Mark Thomas (in cc) can help since
AFAIK Tomcat uses daemon as well.

Regards,
Benedikt

Thomas Kappler <tkapp...@gmail.com> schrieb am Di., 14. Juni 2016 um
21:37 Uhr:

> Hi!
>
> We run a Java application with procrun on Windows Server 2012. The JVM
> is configured with -XX:+ExitOnOutOfMemoryError. As the patch for this
> flag shows, the exit code on OOM is 3.
>
> When I run our application in procrun's "java" mode, i.e., as a
> separate process, I see that procrun receives the exit code 3 when
> Java exits. The debug log shows
>
>     [2016-05-25 03:25:50] [debug] ( prunsrv.c:1563) [ 1964] JVM destroyed.
>     [2016-05-25 03:25:50] [debug] ( prunsrv.c:844 ) [ 1964]
> reportServiceStatusE: 1, 1066, 0, 3
>
> However, when I run it in-process using the "jvm" mode, procrun thinks
> the exit code is 0.
>
>     [2016-05-24 17:17:21] [debug] ( prunsrv.c:920 ) [ 4332] VM exit code: 0
>     [2016-05-24 17:17:21] [debug] ( prunsrv.c:844 ) [ 4332]
> reportServiceStatusE: 1, 0, 0, 0
>
> This screws up the automatic recovery action on failure that is
> configured for the Windows service. An exit code of 0 looks like a
> clean shutdown, not a failure.
>
> We might migrate to the Java mode, but for various reasons I'd prefer
> not to. Is there a way to get the exit code in jvm mode?
>
> Thanks,
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>

Reply via email to