wrapper.event.<event_name>.command.new_process_group

Compatibility :3.5.47
Editions :Professional EditionStandard Edition (Not Supported)Community Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property is used to specify whether or not the command should be started in a new process group.

The default value is "FALSE", meaning the command will be started in the same group as the Wrapper.

This basically affects how signals are received by the command.

On Windows, if the command is started in the same process group as the Wrapper, a CTRL+C in the console where the Wrapper is running will also be received by the command. On the other hand, if the command is started in a new group, the command will ignore the CTRL+C.

On UNIX systems it is possible to either send a signal to a specific process (for example, the Wrapper or the command) or to a process group. Signals sent via keyboard shortcuts, 'killpg', or 'kill' with a negative PID are sent to a process group. If the command is launched in its own process group, it will not receive the signals sent to the Wrapper process group.

Example: (start the command in a new process group to make sure it's not interrupted by a CTRL+C)
wrapper.event.wrapper_stop.command.argv.1=/usr/bin/mycleanup
wrapper.event.wrapper_stop.command.new_process_group=TRUE

Reference: Event Commands

The Java Service Wrapper provides a full set of configuration properties that allows you to make the Wrapper meet your exact needs. Please take a look at the documentation for the individual properties to see all of the possibilities beyond the examples shown above.