java.lang.Object
jnr.posix.NativePOSIX
jnr.posix.BaseNativePOSIX
- All Implemented Interfaces:
POSIX
- Direct Known Subclasses:
WindowsPOSIX
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final jnr.ffi.mapper.ToNativeConverter<jnr.constants.Constant,Integer> static final jnr.ffi.mapper.ToNativeConverter<FileStat,jnr.ffi.Pointer> static final BaseNativePOSIX.PointerConverterprotected final POSIXHandlerprotected final JavaLibCHelperstatic final jnr.ffi.mapper.ToNativeConverter<MsgHdr,jnr.ffi.Pointer> protected final Map<jnr.constants.platform.Signal,SignalHandler> static final jnr.ffi.mapper.ToNativeConverter<NativeTimes,jnr.ffi.Pointer> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseNativePOSIX(LibCProvider libcProvider, POSIXHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionintaccess(CharSequence path, int amode) abstract FileStatintintintintclose(int fd) intconfstr(jnr.constants.platform.Confstr name, ByteBuffer buf, int len) final Cryptcrypt()byte[]crypt(byte[] key, byte[] salt) Call the crypt function with the given key and salt as raw null-terminated byte (C char) strings.crypt(CharSequence key, CharSequence salt) intdaemon(int nochdir, int noclose) intdup(int fd) intdup2(int oldFd, int newFd) intendgrent()intendpwent()jnr.ffi.Pointerenviron()interrno()voiderrno(int value) intShell expanding and escaping version of exec which handles all the preparation of a command line or command list.intShell expanding and escaping version of exec which handles all the preparation of a command line or command list.intintintfchmod(int fd, int mode) intfchown(int fd, int user, int group) intfcntl(int fd, jnr.constants.platform.Fcntl fcntl) intfcntl(int fd, jnr.constants.platform.Fcntl fcntl, int arg) intfcntl(int fd, jnr.constants.platform.Fcntl fcntl, int... args) Deprecated.intfcntlInt(int fd, jnr.constants.platform.Fcntl fcntl, int arg) intfdatasync(int fd) intflock(int fd, int mode) intfork()intfpathconf(int fd, jnr.constants.platform.Pathconf name) fstat(int fd) intfstat(FileDescriptor fileDescriptor) intfstat(FileDescriptor fileDescriptor, FileStat stat) intfsync(int fd) intftruncate(int fd, long offset) intfutimens(int fd, long[] atimespec, long[] mtimespec) intfutimens(int fd, jnr.ffi.Pointer times) intfutimes(int fd, long[] atimeval, long[] mtimeval) getcwd()intintgetegid()intgeteuid()intgetfd(FileDescriptor descriptor) intgetgid()getgrent()getgrgid(int which) long[]intgetgroups(int size, int[] groups) getlogin()intgetpgid()intgetpgid(int pid) intgetpgrp()intgetpid()intgetppid()intgetpriority(int which, int who) getpwent()getpwuid(int which) getrlimit(int resource) intgetrlimit(int resource, jnr.ffi.Pointer rlim) intintgettimeofday(Timeval tv) intgetuid()intisatty(int fd) booleanisatty(FileDescriptor fd) booleanisNative()intkill(int pid, int signal) intkill(long pid, int signal) intintfinal LibClibc()Returns null if isNative returns false.intintlseek(int fd, long offset, int whence) longlseekLong(int fd, long offset, int whence) intintintintnewProcessMaker(String... command) nl_langinfo(int item) intopen(CharSequence path, int flags, int perm) intpipe(int[] fds) longposix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, CharSequence[] argv, CharSequence[] envp) longposix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) longposix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, CharSequence[] argv, CharSequence[] envp) longposix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) intpread(int fd, byte[] buf, int n, int offset) longpread(int fd, byte[] buf, long n, long offset) intpread(int fd, ByteBuffer buf, int n, int offset) longpread(int fd, ByteBuffer buf, long n, long offset) intpwrite(int fd, byte[] buf, int n, int offset) longpwrite(int fd, byte[] buf, long n, long offset) intpwrite(int fd, ByteBuffer buf, int n, int offset) longpwrite(int fd, ByteBuffer buf, long n, long offset) intraise(int sig) intread(int fd, byte[] buf, int n) longread(int fd, byte[] buf, long n) intread(int fd, ByteBuffer buf, int n) longread(int fd, ByteBuffer buf, long n) intreadlink(CharSequence path, byte[] buf, int bufsize) intreadlink(CharSequence path, ByteBuffer buf, int bufsize) intreadlink(CharSequence path, jnr.ffi.Pointer bufPtr, int bufsize) intintrename(CharSequence oldName, CharSequence newName) intintintsetegid(int egid) intintseteuid(int euid) intsetgid(int gid) intsetgrent()intsetpgid(int pid, int pgid) intsetpgrp(int pid, int pgrp) intsetpriority(int which, int who, int prio) intsetpwent()intsetrlimit(int resource, long rlimCur, long rlimMax) intsetrlimit(int resource, jnr.ffi.Pointer rlim) intintsetsid()intsetuid(int uid) signal(jnr.constants.platform.Signal sig, SignalHandler handler) intsocketpair(int domain, int type, int protocol, int[] fds) intstrerror(int code) intlongsysconf(jnr.constants.platform.Sysconf name) times()inttruncate(CharSequence path, long length) intumask(int mask) protected intprotected <T> Tintunlink(CharSequence path) intintintintintintwait(int[] status) intwaitpid(int pid, int[] status, int flags) intwaitpid(long pid, int[] status, int flags) intwrite(int fd, byte[] buf, int n) longwrite(int fd, byte[] buf, long n) intwrite(int fd, ByteBuffer buf, int n) longwrite(int fd, ByteBuffer buf, long n) Methods inherited from class jnr.posix.NativePOSIX
allocatePosixSpawnattr, allocatePosixSpawnFileActions, socketMacrosMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jnr.posix.POSIX
allocateMsgHdr
-
Field Details
-
handler
-
helper
-
signalHandlers
-
GROUP
-
FileStatConverter
-
TimesConverter
-
ConstantConverter
public static final jnr.ffi.mapper.ToNativeConverter<jnr.constants.Constant,Integer> ConstantConverter -
MsgHdrConverter
-
-
Constructor Details
-
BaseNativePOSIX
-
-
Method Details
-
newProcessMaker
- Specified by:
newProcessMakerin interfacePOSIX
-
newProcessMaker
- Specified by:
newProcessMakerin interfacePOSIX
-
libc
Description copied from interface:POSIXReturns null if isNative returns false. -
crypt
-
unimplementedNull
protected <T> T unimplementedNull() -
unimplementedInt
protected int unimplementedInt() -
chmod
-
fchmod
public int fchmod(int fd, int mode) -
chown
-
fchown
public int fchown(int fd, int user, int group) -
crypt
-
crypt
public byte[] crypt(byte[] key, byte[] salt) Description copied from interface:POSIXCall the crypt function with the given key and salt as raw null-terminated byte (C char) strings. -
exec
Description copied from interface:POSIXShell expanding and escaping version of exec which handles all the preparation of a command line or command list. -
exec
Description copied from interface:POSIXShell expanding and escaping version of exec which handles all the preparation of a command line or command list. -
execv
-
execve
-
fstat
-
fstat
-
fstat
-
fstat
-
environ
public jnr.ffi.Pointer environ() -
getenv
-
getegid
public int getegid() -
geteuid
public int geteuid() -
getgid
public int getgid() -
getdtablesize
public int getdtablesize()- Specified by:
getdtablesizein interfacePOSIX
-
getlogin
-
getpgid
public int getpgid() -
getpgrp
public int getpgrp() -
getpid
public int getpid() -
getppid
public int getppid() -
getpwent
-
getpwuid
-
getpwnam
-
getgrent
-
getgrgid
-
getgrnam
-
setpwent
public int setpwent() -
endpwent
public int endpwent() -
setgrent
public int setgrent() -
endgrent
public int endgrent() -
getuid
public int getuid() -
getrlimit
-
getrlimit
public int getrlimit(int resource, jnr.ffi.Pointer rlim) -
getrlimit
-
setrlimit
-
setrlimit
public int setrlimit(int resource, jnr.ffi.Pointer rlim) -
setrlimit
public int setrlimit(int resource, long rlimCur, long rlimMax) -
setegid
public int setegid(int egid) -
seteuid
public int seteuid(int euid) -
setgid
public int setgid(int gid) -
getfd
-
getpgid
public int getpgid(int pid) -
setpgid
public int setpgid(int pid, int pgid) -
setpgrp
public int setpgrp(int pid, int pgrp) -
setsid
public int setsid() -
setuid
public int setuid(int uid) -
kill
public int kill(int pid, int signal) -
kill
public int kill(long pid, int signal) -
signal
-
raise
public int raise(int sig) -
lchmod
-
lchown
-
link
-
lstat
-
lstat
-
mkdir
-
rmdir
-
setenv
-
stat
-
stat
-
symlink
-
readlink
- Specified by:
readlinkin interfacePOSIX- Throws:
IOException
-
readlink
-
readlink
-
readlink
-
unsetenv
-
umask
public int umask(int mask) -
utimes
-
utimes
-
futimes
public int futimes(int fd, long[] atimeval, long[] mtimeval) -
lutimes
-
utimensat
-
utimensat
-
futimens
public int futimens(int fd, long[] atimespec, long[] mtimespec) -
futimens
public int futimens(int fd, jnr.ffi.Pointer times) -
fork
public int fork() -
waitpid
public int waitpid(int pid, int[] status, int flags) -
waitpid
public int waitpid(long pid, int[] status, int flags) -
wait
public int wait(int[] status) -
getpriority
public int getpriority(int which, int who) - Specified by:
getpriorityin interfacePOSIX
-
setpriority
public int setpriority(int which, int who, int prio) - Specified by:
setpriorityin interfacePOSIX
-
isatty
-
isatty
public int isatty(int fd) -
errno
public int errno() -
errno
public void errno(int value) -
chdir
-
isNative
public boolean isNative() -
posix_spawnp
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, CharSequence[] argv, CharSequence[] envp) -
posix_spawnp
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) - Specified by:
posix_spawnpin interfacePOSIX
-
posix_spawnp
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) - Specified by:
posix_spawnpin interfacePOSIX
-
posix_spawnp
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, CharSequence[] argv, CharSequence[] envp) -
flock
public int flock(int fd, int mode) -
dup
public int dup(int fd) -
dup2
public int dup2(int oldFd, int newFd) -
fcntlInt
public int fcntlInt(int fd, jnr.constants.platform.Fcntl fcntl, int arg) -
fcntl
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntl) -
fcntl
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntl, int arg) -
fcntl
Deprecated.Description copied from interface:POSIXfcntl(2) -
access
-
close
public int close(int fd) -
allocateStat
- Specified by:
allocateStatin interfacePOSIX
-
sysconf
public long sysconf(jnr.constants.platform.Sysconf name) -
confstr
-
fpathconf
public int fpathconf(int fd, jnr.constants.platform.Pathconf name) -
times
-
unlink
-
open
-
read
public long read(int fd, byte[] buf, long n) -
write
public long write(int fd, byte[] buf, long n) -
read
-
write
-
pread
public long pread(int fd, byte[] buf, long n, long offset) -
pwrite
public long pwrite(int fd, byte[] buf, long n, long offset) -
pread
-
pwrite
-
read
public int read(int fd, byte[] buf, int n) -
write
public int write(int fd, byte[] buf, int n) -
read
-
write
-
pread
public int pread(int fd, byte[] buf, int n, int offset) -
pwrite
public int pwrite(int fd, byte[] buf, int n, int offset) -
pread
-
pwrite
-
lseek
public int lseek(int fd, long offset, int whence) -
lseekLong
public long lseekLong(int fd, long offset, int whence) -
pipe
public int pipe(int[] fds) -
socketpair
public int socketpair(int domain, int type, int protocol, int[] fds) - Specified by:
socketpairin interfacePOSIX
-
sendmsg
-
recvmsg
-
truncate
-
ftruncate
public int ftruncate(int fd, long offset) -
rename
-
gethostname
- Specified by:
gethostnamein interfacePOSIX
-
getcwd
-
fsync
public int fsync(int fd) -
fdatasync
public int fdatasync(int fd) -
mkfifo
-
daemon
public int daemon(int nochdir, int noclose) -
getgroups
public long[] getgroups() -
getgroups
public int getgroups(int size, int[] groups) -
nl_langinfo
- Specified by:
nl_langinfoin interfacePOSIX
-
setlocale
-
strerror
-
allocateTimeval
- Specified by:
allocateTimevalin interfacePOSIX
-
gettimeofday
- Specified by:
gettimeofdayin interfacePOSIX
-