Package jnr.posix
Class LazyPOSIX
java.lang.Object
jnr.posix.LazyPOSIX
- All Implemented Interfaces:
POSIX
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
access
(CharSequence path, int amode) int
int
int
int
close
(int fd) int
confstr
(jnr.constants.platform.Confstr name, ByteBuffer buf, int len) 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) int
daemon
(int nochdir, int noclose) int
dup
(int fd) int
dup2
(int oldFd, int newFd) int
endgrent()
int
endpwent()
jnr.ffi.Pointer
environ()
int
errno()
void
errno
(int value) int
Shell expanding and escaping version of exec which handles all the preparation of a command line or command list.int
Shell expanding and escaping version of exec which handles all the preparation of a command line or command list.int
int
int
fchmod
(int fd, int mode) int
fchown
(int fd, int user, int group) int
fcntl
(int fd, jnr.constants.platform.Fcntl fcntlConst) int
fcntl
(int fd, jnr.constants.platform.Fcntl fcntlConst, int arg) int
fcntl
(int fd, jnr.constants.platform.Fcntl fcntlConst, int... arg) Deprecated.int
fcntlInt
(int fd, jnr.constants.platform.Fcntl fcntlConst, int arg) int
fdatasync
(int fd) int
flock
(int fd, int mode) int
fork()
int
fpathconf
(int fd, jnr.constants.platform.Pathconf name) fstat
(int fd) int
fstat
(FileDescriptor descriptor) int
fstat
(FileDescriptor descriptor, FileStat stat) int
fsync
(int fd) int
ftruncate
(int fd, long offset) int
futimens
(int fd, long[] atimespec, long[] mtimespec) int
futimens
(int fd, jnr.ffi.Pointer times) int
futimes
(int fd, long[] atimeval, long[] mtimeval) getcwd()
int
int
getegid()
int
geteuid()
int
getgid()
getgrent()
getgrgid
(int which) long[]
int
getgroups
(int size, int[] groups) getlogin()
int
getpgid()
int
getpgid
(int pid) int
getpgrp()
int
getpid()
int
getppid()
int
getpriority
(int which, int who) getpwent()
getpwuid
(int which) getrlimit
(int resource) int
getrlimit
(int resource, jnr.ffi.Pointer rlim) int
int
gettimeofday
(Timeval tv) int
getuid()
int
isatty
(int descriptor) boolean
isatty
(FileDescriptor descriptor) boolean
isNative()
int
kill
(int pid, int signal) int
kill
(long pid, int signal) int
int
libc()
Returns null if isNative returns false.int
private final POSIX
int
lseek
(int fd, long offset, int whence) long
lseekLong
(int fd, long offset, int whence) int
int
int
int
newProcessMaker
(String... command) nl_langinfo
(int item) int
open
(CharSequence path, int flags, int perm) int
pipe
(int[] fds) private final POSIX
posix()
long
posix_spawnp
(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) long
posix_spawnp
(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) int
pread
(int fd, byte[] buf, int n, int offset) long
pread
(int fd, byte[] buf, long n, long offset) int
pread
(int fd, ByteBuffer buf, int n, int offset) long
pread
(int fd, ByteBuffer buf, long n, long offset) int
pwrite
(int fd, byte[] buf, int n, int offset) long
pwrite
(int fd, byte[] buf, long n, long offset) int
pwrite
(int fd, ByteBuffer buf, int n, int offset) long
pwrite
(int fd, ByteBuffer buf, long n, long offset) int
raise
(int sig) int
read
(int fd, byte[] buf, int n) long
read
(int fd, byte[] buf, long n) int
read
(int fd, ByteBuffer buf, int n) long
read
(int fd, ByteBuffer buf, long n) int
readlink
(CharSequence path, byte[] buf, int bufsize) int
readlink
(CharSequence path, ByteBuffer buf, int bufsize) int
readlink
(CharSequence path, jnr.ffi.Pointer bufPtr, int bufsize) int
int
rename
(CharSequence oldName, CharSequence newName) int
int
int
setegid
(int egid) int
int
seteuid
(int euid) int
setgid
(int gid) int
setgrent()
int
setpgid
(int pid, int pgid) int
setpgrp
(int pid, int pgrp) int
setpriority
(int which, int who, int prio) int
setpwent()
int
setrlimit
(int resource, long rlimCur, long rlimMax) int
setrlimit
(int resource, jnr.ffi.Pointer rlim) int
int
setsid()
int
setuid
(int uid) signal
(jnr.constants.platform.Signal sig, SignalHandler handler) int
socketpair
(int domain, int type, int protocol, int[] fds) int
strerror
(int code) int
long
sysconf
(jnr.constants.platform.Sysconf name) times()
int
truncate
(CharSequence path, long length) int
umask
(int mask) int
unlink
(CharSequence path) int
int
int
int
int
int
wait
(int[] status) int
waitpid
(int pid, int[] status, int flags) int
waitpid
(long pid, int[] status, int flags) int
write
(int fd, byte[] buf, int n) long
write
(int fd, byte[] buf, long n) int
write
(int fd, ByteBuffer buf, int n) long
write
(int fd, ByteBuffer buf, long n)
-
Field Details
-
handler
-
useNativePosix
private final boolean useNativePosix -
posix
-
-
Constructor Details
-
LazyPOSIX
LazyPOSIX(POSIXHandler handler, boolean useNativePosix)
-
-
Method Details
-
posix
-
loadPOSIX
-
newProcessMaker
- Specified by:
newProcessMaker
in interfacePOSIX
-
newProcessMaker
- Specified by:
newProcessMaker
in interfacePOSIX
-
allocateStat
- Specified by:
allocateStat
in interfacePOSIX
-
allocateMsgHdr
- Specified by:
allocateMsgHdr
in interfacePOSIX
-
chdir
-
chmod
-
fchmod
public int fchmod(int fd, int mode) -
chown
-
crypt
-
crypt
public byte[] crypt(byte[] key, byte[] salt) Description copied from interface:POSIX
Call the crypt function with the given key and salt as raw null-terminated byte (C char) strings. -
fchown
public int fchown(int fd, int user, int group) -
endgrent
public int endgrent() -
endpwent
public int endpwent() -
errno
public int errno() -
errno
public void errno(int value) -
exec
Description copied from interface:POSIX
Shell expanding and escaping version of exec which handles all the preparation of a command line or command list. -
exec
Description copied from interface:POSIX
Shell expanding and escaping version of exec which handles all the preparation of a command line or command list. -
execv
-
execve
-
fork
public int fork() -
fstat
-
fstat
-
fstat
-
fstat
-
getegid
public int getegid() -
geteuid
public int geteuid() -
getgid
public int getgid() -
getdtablesize
public int getdtablesize()- Specified by:
getdtablesize
in interfacePOSIX
-
getgrent
-
getgrgid
-
getgrnam
-
getlogin
-
getpgid
public int getpgid() -
getpgid
public int getpgid(int pid) -
getpgrp
public int getpgrp() -
getpid
public int getpid() -
getppid
public int getppid() -
getpriority
public int getpriority(int which, int who) - Specified by:
getpriority
in interfacePOSIX
-
getpwent
-
getpwnam
-
getpwuid
-
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) -
isatty
-
isatty
public int isatty(int descriptor) -
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
-
readlink
- Specified by:
readlink
in interfacePOSIX
- Throws:
IOException
-
readlink
-
readlink
-
readlink
-
rmdir
-
setegid
public int setegid(int egid) -
seteuid
public int seteuid(int euid) -
setgid
public int setgid(int gid) -
setgrent
public int setgrent() -
setpgid
public int setpgid(int pid, int pgid) -
setpgrp
public int setpgrp(int pid, int pgrp) -
setpriority
public int setpriority(int which, int who, int prio) - Specified by:
setpriority
in interfacePOSIX
-
setpwent
public int setpwent() -
setsid
public int setsid() -
setuid
public int setuid(int uid) -
stat
-
stat
-
symlink
-
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) -
wait
public int wait(int[] status) -
waitpid
public int waitpid(int pid, int[] status, int flags) -
waitpid
public int waitpid(long pid, int[] status, int flags) -
isNative
public boolean isNative() -
libc
Description copied from interface:POSIX
Returns null if isNative returns false. -
environ
public jnr.ffi.Pointer environ() -
getenv
-
setenv
-
unsetenv
-
posix_spawnp
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp) - Specified by:
posix_spawnp
in 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_spawnp
in interfacePOSIX
-
sysconf
public long sysconf(jnr.constants.platform.Sysconf name) -
confstr
-
fpathconf
public int fpathconf(int fd, jnr.constants.platform.Pathconf name) -
times
-
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 fcntlConst, int arg) -
fcntl
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntlConst) -
fcntl
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntlConst, int arg) -
fcntl
Deprecated.Description copied from interface:POSIX
fcntl(2) -
access
-
close
public int close(int fd) -
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:
socketpair
in interfacePOSIX
-
sendmsg
-
recvmsg
-
truncate
-
ftruncate
public int ftruncate(int fd, long offset) -
rename
-
getcwd
-
fsync
public int fsync(int fd) -
fdatasync
public int fdatasync(int fd) -
mkfifo
-
gethostname
- Specified by:
gethostname
in interfacePOSIX
-
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_langinfo
in interfacePOSIX
-
setlocale
-
strerror
-
allocateTimeval
- Specified by:
allocateTimeval
in interfacePOSIX
-
gettimeofday
- Specified by:
gettimeofday
in interfacePOSIX
-