Package hudson.util.jna
Interface GNUCLibrary
- All Superinterfaces:
com.sun.jna.Library
public interface GNUCLibrary
extends com.sun.jna.Library
GNU C library.
Not available on all platforms (such as Linux/PPC, IBM mainframe, etc.), so the caller should recover gracefully
in case of LinkageError. See JENKINS-4820.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sun.jna.Library
com.sun.jna.Library.Handler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final GNUCLibraryFields 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 TypeMethodDescriptionintintintintclose(int fd) intdup(int old) intdup2(int old, int _new) intintintfcntl(int fd, int command) intintfork()intintgetegid()intgeteuid()intgetpid()intgetppid()intkill(int pid, int signum) intvoidlongpread(int fd, com.sun.jna.Memory buffer, com.sun.jna.NativeLong size, com.sun.jna.NativeLong offset) intRead a symlink.intintintsetsid()strerror(int errno) intCreates a symlink.intsysctl(int[] mib, int nameLen, com.sun.jna.Pointer oldp, com.sun.jna.ptr.IntByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.ptr.IntByReference newlen) Deprecated.intsysctl(int[] name, int namelen, com.sun.jna.Pointer oldp, com.sun.jna.ptr.NativeLongByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.NativeLong newlen) intsysctlbyname(String name, com.sun.jna.Pointer oldp, com.sun.jna.ptr.IntByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.ptr.IntByReference newlen) Deprecated.intsysctlbyname(String name, com.sun.jna.Pointer oldp, com.sun.jna.ptr.NativeLongByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.NativeLong newlen) intsysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.IntByReference size) Deprecated.intsysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.NativeLongByReference sizep) intumask(int mask) int
-
Field Details
-
F_GETFD
static final int F_GETFD- See Also:
-
F_SETFD
static final int F_SETFD- See Also:
-
FD_CLOEXEC
static final int FD_CLOEXEC- See Also:
-
LIBC
-
-
Method Details
-
fork
int fork() -
kill
int kill(int pid, int signum) -
setsid
int setsid() -
umask
int umask(int mask) -
getpid
int getpid() -
geteuid
int geteuid() -
getegid
int getegid() -
getppid
int getppid() -
chdir
-
getdtablesize
int getdtablesize() -
execv
-
execvp
-
setenv
-
unsetenv
-
perror
-
strerror
-
fcntl
int fcntl(int fd, int command) -
fcntl
-
chown
-
chmod
-
open
- Throws:
com.sun.jna.LastErrorException
-
dup
int dup(int old) -
dup2
int dup2(int old, int _new) -
pread
long pread(int fd, com.sun.jna.Memory buffer, com.sun.jna.NativeLong size, com.sun.jna.NativeLong offset) throws com.sun.jna.LastErrorException - Throws:
com.sun.jna.LastErrorException
-
close
int close(int fd) -
rename
-
sysctlbyname
@Deprecated int sysctlbyname(String name, com.sun.jna.Pointer oldp, com.sun.jna.ptr.IntByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.ptr.IntByReference newlen) Deprecated. -
sysctlbyname
int sysctlbyname(String name, com.sun.jna.Pointer oldp, com.sun.jna.ptr.NativeLongByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.NativeLong newlen) -
sysctl
@Deprecated int sysctl(int[] mib, int nameLen, com.sun.jna.Pointer oldp, com.sun.jna.ptr.IntByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.ptr.IntByReference newlen) Deprecated. -
sysctl
int sysctl(int[] name, int namelen, com.sun.jna.Pointer oldp, com.sun.jna.ptr.NativeLongByReference oldlenp, com.sun.jna.Pointer newp, com.sun.jna.NativeLong newlen) -
sysctlnametomib
@Deprecated int sysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.IntByReference size) Deprecated. -
sysctlnametomib
int sysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.NativeLongByReference sizep) -
symlink
Creates a symlink. See symlink(3) -
readlink
Read a symlink. The name will be copied into the specified memory, and returns the number of bytes copied. The string is not null-terminated.- Returns:
- if the return value equals size, the caller needs to retry with a bigger buffer. If -1, error.
-