You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/04/02 20:53:10 UTC

[GitHub] jbliznak closed pull request #179: [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS

jbliznak closed pull request #179: [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
URL: https://github.com/apache/maven-surefire/pull/179
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 462eacc9b..32e3ad7c5 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.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 @@ ProcessInfo execute( String... command )
             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 );


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services