You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/03/19 01:20:58 UTC

[maven-surefire] 01/01: [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1479
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit b4c98cf0fc0ebd80a8832a950241e70755f58d1c
Author: Jan Bliznak <jb...@redhat.com>
AuthorDate: Fri Mar 16 16:53:42 2018 +0100

    [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
---
 .../src/main/java/org/apache/maven/surefire/booter/PpidChecker.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
index 462eacc..32e3ad7 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
@@ -36,6 +36,7 @@ import static java.util.concurrent.TimeUnit.MINUTES;
 import static java.util.regex.Pattern.compile;
 import static org.apache.commons.io.IOUtils.closeQuietly;
 import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_HP_UX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_UNIX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static org.apache.maven.surefire.booter.ProcessInfo.ERR_PROCESS_INFO;
@@ -295,6 +296,10 @@ final class PpidChecker
             ProcessInfo processInfo = INVALID_PROCESS_INFO;
             try
             {
+                if ( IS_OS_HP_UX ) // force to run shell commands in UNIX Standard mode on HP-UX
+                {
+                    processBuilder.environment().put( "UNIX95", "1" );
+                }
                 process = processBuilder.start();
                 destroyableCommands.add( process );
                 Scanner scanner = new Scanner( process.getInputStream(), charset );

-- 
To stop receiving notification emails like this one, please contact
tibordigana@apache.org.