public final class ProcessProperties extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
destroy(long processID)
Kills the process.
|
static boolean |
destroyForcibly(long processID)
Kills the process forcibly.
|
static void |
exec(Path executable,
String... args)
Replaces the current process image with the process image specified by the given path invoked
with the given args.
|
static void |
exec(Path executable,
String[] args,
Map<String,String> env)
Replaces the current process image with the process image specified by the given path invoked
with the given arguments and environment.
|
static int |
getArgumentVectorBlockSize()
If the running image is an executable the total size of the argument vector of the running
process gets returned.
|
static String |
getArgumentVectorProgramName()
If the running image is an executable the program name that is stored in the argument vector
of the running process gets returned.
|
static String |
getExecutableName()
Return the canonicalized absolute pathname of the executable.
|
static String |
getObjectFile(CEntryPointLiteral<?> symbol)
Return the path of the object file defining the symbol specified as a
CEntryPointLiteral containing a function pointer to symbol. |
static String |
getObjectFile(String symbol)
Return the path of the object file defining the symbol specified as a
String
containing the symbol name. |
static long |
getProcessID()
Get the Process ID of the process executing the image.
|
static long |
getProcessID(Process process)
Get the Process ID of the given process object.
|
static boolean |
isAlive(long processID)
Tests whether the process represented by the given Process ID is alive.
|
static boolean |
setArgumentVectorProgramName(String name)
If the running image is an executable the program name that is stored in the argument vector
of the running process gets replaced with the given name.
|
static String |
setLocale(String category,
String locale)
Set the program locale.
|
static int |
waitForProcessExit(long processID)
Wait for process termination and return its exit status.
|
public static String getExecutableName()
public static long getProcessID()
public static long getProcessID(Process process)
public static int waitForProcessExit(long processID)
public static boolean destroy(long processID)
public static boolean destroyForcibly(long processID)
public static boolean isAlive(long processID)
public static String getObjectFile(String symbol)
String
containing the symbol name.public static String getObjectFile(CEntryPointLiteral<?> symbol)
CEntryPointLiteral
containing a function pointer to symbol.public static String setLocale(String category, String locale)
public static void exec(Path executable, String... args)
public static void exec(Path executable, String[] args, Map<String,String> env)
public static String getArgumentVectorProgramName()
UnsupportedOperationException
- if called from a platform that does not support
argument vector manipulation (Windows) or if called from a shared library image.public static boolean setArgumentVectorProgramName(String name)
UnsupportedOperationException
- if called from a platform that does not support
argument vector manipulation (Windows) or if called from a shared library image.public static int getArgumentVectorBlockSize()