Package net.bytebuddy.agent
Interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary
-
- All Superinterfaces:
com.sun.jna.Library
- Enclosing class:
- VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment
protected static interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary extends com.sun.jna.Library
An API for interaction with POSIX systems.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary.SemaphoreOperation
A structure to represent a semaphore operation forsemop
.
-
Field Summary
Fields Modifier and Type Field Description static int
EAGAIN
Indicates that a request timed out.static int
EDEADLK
Indicates a dead lock on a resource.static int
ESRCH
Indicates that a process does not exist.static short
IPC_NOWAIT
Indicates that one should not wait for the release of a semaphore if it is not currently available.static int
NULL_SIGNAL
A null signal.static short
SEM_UNDO
Indicates that a semaphore's operations should be undone at process shutdown.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
chmod(java.lang.String path, int mode)
Runs thechmod
command.int
chown(java.lang.String path, long userId)
Runs thechown
command.int
ftok(java.lang.String path, int id)
Runs theftok
command.int
getpid()
Runs thegetpid
command.int
getuid()
Runs thegetuid
command.int
kill(int processId, int signal)
Runs thekill
command.int
semget(int key, int count, int flags)
Runs thesemget
command.int
semop(int id, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary.SemaphoreOperation operation, int flags)
Runs thesemop
command.
-
-
-
Field Detail
-
NULL_SIGNAL
static final int NULL_SIGNAL
A null signal.- See Also:
- Constant Field Values
-
ESRCH
static final int ESRCH
Indicates that a process does not exist.- See Also:
- Constant Field Values
-
EAGAIN
static final int EAGAIN
Indicates that a request timed out.- See Also:
- Constant Field Values
-
EDEADLK
static final int EDEADLK
Indicates a dead lock on a resource.- See Also:
- Constant Field Values
-
SEM_UNDO
static final short SEM_UNDO
Indicates that a semaphore's operations should be undone at process shutdown.- See Also:
- Constant Field Values
-
IPC_NOWAIT
static final short IPC_NOWAIT
Indicates that one should not wait for the release of a semaphore if it is not currently available.- See Also:
- Constant Field Values
-
-
Method Detail
-
getpid
int getpid() throws com.sun.jna.LastErrorException
Runs thegetpid
command.- Returns:
- The command's return value.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
getuid
int getuid() throws com.sun.jna.LastErrorException
Runs thegetuid
command.- Returns:
- The command's return value.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
kill
int kill(int processId, int signal) throws com.sun.jna.LastErrorException
Runs thekill
command.- Parameters:
processId
- The target process id.signal
- The signal to send.- Returns:
- The command's return value.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
chmod
int chmod(java.lang.String path, int mode) throws com.sun.jna.LastErrorException
Runs thechmod
command.- Parameters:
path
- The file path.mode
- The mode to set.- Returns:
- The return code.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
chown
int chown(java.lang.String path, long userId) throws com.sun.jna.LastErrorException
Runs thechown
command.- Parameters:
path
- The file path.userId
- The user id to set.- Returns:
- The return code.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
ftok
int ftok(java.lang.String path, int id) throws com.sun.jna.LastErrorException
Runs theftok
command.- Parameters:
path
- The file path.id
- The id being used for creating the generated key.- Returns:
- The generated key.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
semget
int semget(int key, int count, int flags) throws com.sun.jna.LastErrorException
Runs thesemget
command.- Parameters:
key
- The key of the semaphore.count
- The initial count of the semaphore.flags
- The flags to set.- Returns:
- The id of the semaphore.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
semop
int semop(int id, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary.SemaphoreOperation operation, int flags) throws com.sun.jna.LastErrorException
Runs thesemop
command.- Parameters:
id
- The id of the semaphore.operation
- The initial count of the semaphore.flags
- The flags to set.- Returns:
- The return code.
- Throws:
com.sun.jna.LastErrorException
- If the operation was not successful.
-
-