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
-
-
Field Summary
Fields Modifier and Type Field Description static int
F_GETFD
static int
F_SETFD
static int
FD_CLOEXEC
static GNUCLibrary
LIBC
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description int
chdir(String dir)
int
chmod(String fileName, int i)
int
chown(String fileName, int uid, int gid)
int
close(int fd)
int
dup(int old)
int
dup2(int old, int _new)
int
execv(String path, com.sun.jna.StringArray args)
int
execvp(String file, com.sun.jna.StringArray args)
int
fcntl(int fd, int command)
int
fcntl(int fd, int command, int flags)
int
fork()
int
getdtablesize()
int
getegid()
int
geteuid()
int
getpid()
int
getppid()
int
kill(int pid, int signum)
int
open(String pathname, int flags)
void
perror(String msg)
long
pread(int fd, com.sun.jna.Memory buffer, com.sun.jna.NativeLong size, com.sun.jna.NativeLong offset)
int
readlink(String filename, com.sun.jna.Memory buffer, com.sun.jna.NativeLong size)
Read a symlink.int
rename(String oldname, String newname)
int
setenv(String name, String value, int replace)
int
setsid()
String
strerror(int errno)
int
symlink(String oldname, String newname)
Creates a symlink.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.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)
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.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)
int
sysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.IntByReference size)
Deprecated.int
sysctlnametomib(String name, com.sun.jna.Pointer mibp, com.sun.jna.ptr.NativeLongByReference sizep)
int
umask(int mask)
int
unsetenv(String name)
-
-
-
Field Detail
-
F_GETFD
static final int F_GETFD
- See Also:
- Constant Field Values
-
F_SETFD
static final int F_SETFD
- See Also:
- Constant Field Values
-
FD_CLOEXEC
static final int FD_CLOEXEC
- See Also:
- Constant Field Values
-
LIBC
static final GNUCLibrary LIBC
-
-
Method Detail
-
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
int chdir(String dir)
-
getdtablesize
int getdtablesize()
-
execv
int execv(String path, com.sun.jna.StringArray args)
-
execvp
int execvp(String file, com.sun.jna.StringArray args)
-
unsetenv
int unsetenv(String name)
-
perror
void perror(String msg)
-
strerror
String strerror(int errno)
-
fcntl
int fcntl(int fd, int command)
-
fcntl
int fcntl(int fd, int command, int flags)
-
chown
int chown(String fileName, int uid, int gid)
-
chmod
int chmod(String fileName, int i)
-
open
int open(String pathname, int flags) throws com.sun.jna.LastErrorException
- 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)
-
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
int symlink(String oldname, String newname)
Creates a symlink. See symlink(3)
-
readlink
int readlink(String filename, com.sun.jna.Memory buffer, com.sun.jna.NativeLong size)
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.
-
-