This commit is wrong and bad on multiple levels. Please revert

On Sat, Jun 24, 2017 at 10:56 AM, <jler...@apache.org> wrote:

> Author: jleroux
> Date: Sat Jun 24 07:56:45 2017
> New Revision: 1799736
>
> URL: http://svn.apache.org/viewvc?rev=1799736&view=rev
> Log:
> No functional change
>
> Improves terminateOfbiz byt using TERM before KILL
> https://fr.wikipedia.org/wiki/Kill_(Unix)
> https://unix.stackexchange.com/questions/8916/when-
> should-i-not-kill-9-a-process
>
> Modified:
>     ofbiz/ofbiz-framework/trunk/build.gradle
>
> Modified: ofbiz/ofbiz-framework/trunk/build.gradle
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
> build.gradle?rev=1799736&r1=1799735&r2=1799736&view=diff
> ============================================================
> ==================
> --- ofbiz/ofbiz-framework/trunk/build.gradle (original)
> +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Jun 24 07:56:45 2017
> @@ -332,8 +332,13 @@ task terminateOfbiz(group: ofbizServer,
>                  standardOutput = processOutput
>              }
>              processOutput.toString().split(System.lineSeparator()).each
> { line ->
> +                // Try to terminate cleanly
>                  if (line ==~ /.*org\.apache\.ofbiz\.base\.start\.Start.*/)
> {
> -                    exec { commandLine 'kill', '-9',
> line.tokenize().first() }
> +                    exec { commandLine 'kill', '-TERM',
> line.tokenize().first() }
> +                }
> +                // Only kill if needed
> +                if (line ==~ /.*org\.apache\.ofbiz\.base\.start\.Start.*/)
> {
> +                    exec { commandLine 'kill', '-KILL',
> line.tokenize().first() }
>                  }
>              }
>          }
>
>
>

Reply via email to