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 ClassesModifier and TypeInterfaceDescriptionstatic class
A structure to represent a semaphore operation forsemop
.Nested classes/interfaces inherited from interface com.sun.jna.Library
com.sun.jna.Library.Handler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that a request timed out.static final int
Indicates a dead lock on a resource.static final int
Indicates that a process does not exist.static final short
Indicates that one should not wait for the release of a semaphore if it is not currently available.static final int
A null signal.static final short
Indicates that a semaphore's operations should be undone at process shutdown.Fields inherited from interface com.sun.jna.Library
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
-
Method Summary
Modifier and TypeMethodDescriptionint
Runs thechmod
command.int
Runs thechown
command.int
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 Details
-
NULL_SIGNAL
static final int NULL_SIGNALA null signal.- See Also:
-
ESRCH
static final int ESRCHIndicates that a process does not exist.- See Also:
-
EAGAIN
static final int EAGAINIndicates that a request timed out.- See Also:
-
EDEADLK
static final int EDEADLKIndicates a dead lock on a resource.- See Also:
-
SEM_UNDO
static final short SEM_UNDOIndicates that a semaphore's operations should be undone at process shutdown.- See Also:
-
IPC_NOWAIT
static final short IPC_NOWAITIndicates that one should not wait for the release of a semaphore if it is not currently available.- See Also:
-
-
Method Details
-
getpid
int getpid() throws com.sun.jna.LastErrorExceptionRuns thegetpid
command.- Returns:
- The command's return value.
- Throws:
com.sun.jna.LastErrorException
- If an error occurred.
-
getuid
int getuid() throws com.sun.jna.LastErrorExceptionRuns 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
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
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
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.
-