|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjtux.UProcess
public class UProcess
UProcess-related POSIX/SUS calls.
Skipped: atexit -- C function, inappropriate for Java exec functions other than execvp -- "l" functions not possible; environment can be dealt with separately (need funciton to access environ, though) _longjmp, _setjmp, longjmp, setjmp, siglongjmp, sigsetjmp -- not appropriate for Java signal functions -- because of interference with the JVM's use of signals. Some of the functionality have been made to work, but others wouldn't faithfully implement POSIX/SUS -- it would not be a good learning vehicle. ulimit -- messy; use getrlimit and setrlimit instead vfork -- obsolete ToDo: waitid
Nested Class Summary | |
---|---|
static class |
UProcess.s_rlimit
Java version of C struct rlimit. |
static class |
UProcess.s_rusage
Java version of C struct rusage. |
static class |
UProcess.s_sigaction
Java version of C struct sigaction. |
static class |
UProcess.s_sigevent
Java version of C struct sigevent. |
static class |
UProcess.s_timespec
Java version of C struct timespec. |
static class |
UProcess.s_timeval
Java version of C struct timeval. |
static class |
UProcess.s_tms
Java version of C struct tms. |
static class |
UProcess.siginfo_t
Java version of C type (structure) siginfo_t. |
static class |
UProcess.sigset_t
Java version of C type sigset_t. |
static class |
UProcess.stack_t
Java version of C type stack_t. |
static class |
UProcess.u_sigval
Java version of C union sigval. |
static class |
UProcess.u_sigval_int
|
static class |
UProcess.u_sigval_ptr
|
Constructor Summary | |
---|---|
UProcess()
|
Method Summary | |
---|---|
static void |
_exit(int status)
Calls _exit. |
static void |
abort()
Calls abort. |
static void |
chdir(java.lang.String path)
Calls chdir. |
static void |
chroot(java.lang.String path)
Calls chroot. |
static long |
clock()
Calls clock. |
static void |
execvp(java.lang.String file,
java.lang.String[] args)
Calls execvp. |
static void |
exit(int status)
Calls exit. |
static void |
fchdir(int fd)
Calls fchdir. |
static long |
fork()
Calls fork. |
static void |
getcwd(java.lang.StringBuffer path)
Calls getcwd. |
static long |
getegid()
Calls getegid. |
static java.lang.String |
getenv(java.lang.String var)
Calls getenv. |
static long |
geteuid()
Calls geteuid. |
static long |
getgid()
Calls getgid. |
static long |
getpgid(long pid)
Calls getpgid. |
static long |
getpid()
Calls getpid. |
static long |
getppid()
Calls getppid. |
static void |
getrlimit(int resource,
UProcess.s_rlimit rl)
Calls getrlimit. |
static void |
getrusage(int who,
UProcess.s_rusage r_usage)
Calls getrusage. |
static long |
getsid(long pid)
Calls getsid. |
static long |
getuid()
Calls getuid. |
static void |
kill(long pid,
long signum)
Calls kill. |
static void |
nice(int incr)
Calls nice. |
static void |
pause()
Calls pause. |
static void |
pthread_sigmask(int how,
UProcess.sigset_t set,
UProcess.sigset_t oset)
Calls pthread_sigmask. |
static void |
putenv(java.lang.String string)
Calls putenv. |
static void |
setegid(long gid)
Calls setegid. |
static void |
setenv(java.lang.String var,
java.lang.String val,
boolean overwrite)
Calls setenv. |
static void |
seteuid(long uid)
Calls seteuid. |
static void |
setgid(long gid)
Calls setgid. |
static void |
setpgid(long pid,
long pgid)
Calls setpgid. |
static void |
setrlimit(int resource,
UProcess.s_rlimit rl)
Calls setrlimit. |
static long |
setsid()
Calls setsid. |
static void |
setuid(long uid)
Calls setuid. |
static int |
sig_get_SIGRTMAX()
Function to get the (dynamic) value of SIGRTMAX. |
static int |
sig_get_SIGRTMIN()
Function to get the (dynamic) value of SIGRTMIN. |
static void |
sigaction_x(int signum,
UProcess.s_sigaction action,
UProcess.s_sigaction oaction)
Used by the Java-level function sigaction. |
static void |
sigaction(int signum,
UProcess.s_sigaction action,
UProcess.s_sigaction oaction)
Calls sigaction. |
static void |
sigaddset(UProcess.sigset_t set,
int signum)
Calls sigaddset. |
static void |
sigaltstack(UProcess.stack_t stack,
UProcess.stack_t ostack)
Calls sigaltstack. |
static void |
sigdelset(UProcess.sigset_t set,
int signum)
Calls sigdelset. |
static void |
sigemptyset(UProcess.sigset_t set)
Calls sigemptyset. |
static void |
sigfillset(UProcess.sigset_t set)
Calls sigfillset. |
static void |
siginterrupt(int signum,
int on)
Calls siginterrupt. |
static boolean |
sigismember(UProcess.sigset_t set,
int signum)
Calls sigismember. |
static void |
sigpending(UProcess.sigset_t set)
Calls sigpending. |
static void |
sigprocmask(int how,
UProcess.sigset_t set,
UProcess.sigset_t oset)
Calls sigprocmask. |
static void |
sigqueue(long pid,
int signum,
UProcess.u_sigval value)
Calls sigqueue. |
static void |
sigsuspend(UProcess.sigset_t set)
Calls sigsuspend. |
static void |
sigtimedwait(UProcess.sigset_t set,
UProcess.siginfo_t info,
UProcess.s_timespec ts)
Calls sigtimedwait. |
static void |
sigwait(UProcess.sigset_t set,
UUtil.IntHolder signum)
Calls sigwait. |
static void |
sigwaitinfo(UProcess.sigset_t set,
UProcess.siginfo_t info)
Calls sigwaitinfo. |
static int |
system(java.lang.String command)
Calls system. |
static long |
times(UProcess.s_tms buffer)
Calls times. |
static int |
umask(int cmask)
Calls umask. |
static void |
unsetenv(java.lang.String var)
Calls unsetenv. |
static long |
wait(UExitStatus status)
Calls wait. |
static long |
waitpid(long pid,
UExitStatus status,
int options)
Calls waitpid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UProcess()
Method Detail |
---|
public static void sigaction(int signum, UProcess.s_sigaction action, UProcess.s_sigaction oaction) throws UErrorException
Problem with receiving a signal value (e.g., from mq_notify or sigqueue) is that Jtux doesn't know whether it's an int or a ptr, so it can't construct the appropriate subclass for the Java class u_sigval. On the theory that pointers aren't that useful with Java and that, even when they're used with Jtux, they're passed as longs, the subclass passed in the siginfo_t structure is always a u_signal_int.
Click here for Posix/SUS C API.
UErrorException
public static void abort()
Click here for Posix/SUS C API.
public static void chdir(java.lang.String path) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void chroot(java.lang.String path) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long clock() throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void execvp(java.lang.String file, java.lang.String[] args) throws UErrorException
UProcess.execvp("/usr/bin/echo", new String[] {"echo", "arg1", "arg2"});
Click here for Posix/SUS C API.
UErrorException
public static void exit(int status)
Click here for Posix/SUS C API.
public static void _exit(int status)
Click here for Posix/SUS C API.
public static void fchdir(int fd) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long fork() throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void getcwd(java.lang.StringBuffer path) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long getegid()
Click here for Posix/SUS C API.
public static java.lang.String getenv(java.lang.String var)
Click here for Posix/SUS C API.
public static long geteuid()
Click here for Posix/SUS C API.
public static long getgid()
Click here for Posix/SUS C API.
public static long getpgid(long pid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long getpid()
Click here for Posix/SUS C API.
public static long getppid()
Click here for Posix/SUS C API.
public static void getrlimit(int resource, UProcess.s_rlimit rl) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void getrusage(int who, UProcess.s_rusage r_usage)
Click here for Posix/SUS C API.
public static long getsid(long pid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long getuid()
Click here for Posix/SUS C API.
public static void kill(long pid, long signum)
Click here for Posix/SUS C API.
public static void nice(int incr)
Click here for Posix/SUS C API.
public static void pause() throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void pthread_sigmask(int how, UProcess.sigset_t set, UProcess.sigset_t oset)
Click here for Posix/SUS C API.
public static void putenv(java.lang.String string) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setenv(java.lang.String var, java.lang.String val, boolean overwrite) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setegid(long gid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void seteuid(long uid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setgid(long gid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setpgid(long pid, long pgid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setrlimit(int resource, UProcess.s_rlimit rl) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long setsid() throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void setuid(long uid) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static int sig_get_SIGRTMIN() throws UErrorException
sig_get_SIGRTMIN and sig_get_SIGRTMAX are not fields of UConstant because SIGRTMIN and SIGRTMAX are not necessarily integer constants.
UErrorException
public static int sig_get_SIGRTMAX() throws UErrorException
sig_get_SIGRTMIN and sig_get_SIGRTMAX are not fields of UConstant because SIGRTMIN and SIGRTMAX are not necessarily integer constants.
UErrorException
public static void sigaction_x(int signum, UProcess.s_sigaction action, UProcess.s_sigaction oaction) throws UErrorException
UErrorException
public static void sigaddset(UProcess.sigset_t set, int signum) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigaltstack(UProcess.stack_t stack, UProcess.stack_t ostack) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigdelset(UProcess.sigset_t set, int signum) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigemptyset(UProcess.sigset_t set) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigfillset(UProcess.sigset_t set) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void siginterrupt(int signum, int on) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static boolean sigismember(UProcess.sigset_t set, int signum) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigpending(UProcess.sigset_t set) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigprocmask(int how, UProcess.sigset_t set, UProcess.sigset_t oset) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigqueue(long pid, int signum, UProcess.u_sigval value) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigsuspend(UProcess.sigset_t set) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigtimedwait(UProcess.sigset_t set, UProcess.siginfo_t info, UProcess.s_timespec ts) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigwait(UProcess.sigset_t set, UUtil.IntHolder signum) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static void sigwaitinfo(UProcess.sigset_t set, UProcess.siginfo_t info) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static int system(java.lang.String command) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long times(UProcess.s_tms buffer) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static int umask(int cmask)
Click here for Posix/SUS C API.
public static void unsetenv(java.lang.String var) throws UErrorException
May not be on all systems. Throws ENOSYS if not. Click here for Posix/SUS C API.
UErrorException
public static long wait(UExitStatus status) throws UErrorException
Click here for Posix/SUS C API.
UErrorException
public static long waitpid(long pid, UExitStatus status, int options) throws UErrorException
On Linux, waiting for an exited process doesn't work. If System.exit (the Java method) is called, waitpid stays blocked, as though the process doesn't really exit. If UProcess.exit is called, something inside the system waits, and waitpid returns an error because the process doesn't exist. This is probably due to the way threads are implemented. On Solaris, all works as it should.
Click here for Posix/SUS C API.
UErrorException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |