-
Enhancement
-
Resolution: Duplicate
-
P3
-
9
The java.lang.ProcessHandle.Info interface contains methods for the command and arguments.
Some operating system can only provide a limited command line string.
The string may not contain the path of the command and may be truncated.
The Info.commandLine() method is proposed as:
/**
* Returns the command line of the process.
* <p>
* If {@link #command command()} and {@link #arguments arguments()} return non-null
* optionals, this is simply a convenience method which concatenates
* the values of the two functions separated by spaces. Otherwise it will return a
* best-effort, platform dependent representation of the command line.
*
* @apiNote Note that the returned executable pathname and the
* arguments may be truncated on some platforms due to system
* limitations.
* <p>
* The executable pathname may contain only the
* name of the executable without the full path information.
* It is undecidebale whether white space separates different
* arguments or is part of a single argument.
*
* @return an {@code Optional<String>} of the command line
* of the process
*/
public Optional<String> commandLine();
Some operating system can only provide a limited command line string.
The string may not contain the path of the command and may be truncated.
The Info.commandLine() method is proposed as:
/**
* Returns the command line of the process.
* <p>
* If {@link #command command()} and {@link #arguments arguments()} return non-null
* optionals, this is simply a convenience method which concatenates
* the values of the two functions separated by spaces. Otherwise it will return a
* best-effort, platform dependent representation of the command line.
*
* @apiNote Note that the returned executable pathname and the
* arguments may be truncated on some platforms due to system
* limitations.
* <p>
* The executable pathname may contain only the
* name of the executable without the full path information.
* It is undecidebale whether white space separates different
* arguments or is part of a single argument.
*
* @return an {@code Optional<String>} of the command line
* of the process
*/
public Optional<String> commandLine();
- duplicates
-
JDK-8131168 Refactor ProcessHandleImpl_*.c and add implememtation for AIX
- Resolved
- relates to
-
JDK-8131168 Refactor ProcessHandleImpl_*.c and add implememtation for AIX
- Resolved