Package org.apache.tomcat.jni
Class Proc
java.lang.Object
org.apache.tomcat.jni.Proc
Deprecated.
The scope of the APR/Native Library will be reduced in Tomcat
              10.1.x / Tomcat Native 2.x onwards to only include those
              components required to provide OpenSSL integration with the NIO
              and NIO2 connectors.
Proc
- Author:
- Mladen Turk
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.wait forever for the process to completestatic final intDeprecated.SIGTERM, wait 3 seconds, SIGKILLstatic final intDeprecated.process is sent SIGKILL on apr_pool_t cleanupstatic final intDeprecated.process is never sent any signalsstatic final intDeprecated.send SIGTERM and then waitstatic final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.do not wait -- just see if it has finishedstatic final intDeprecated.child has died, caller must call unregister stillstatic final intDeprecated.somehow the child exited without us knowing ... buggy os?static final intDeprecated.a restart is occurring, perform any necessary cleanup (including sending a special signal to child)static final intDeprecated.a health check is occurring, for most maintenance functions this is a no-op.static final intDeprecated.unregister has been called, do whatever is necessary (including kill the child)static final intDeprecated.write_fd is unwritablestatic final intDeprecated.static final intDeprecated.Do not detachstatic final intDeprecated.static final intDeprecated.process exited normallystatic final intDeprecated.process exited due to a signalstatic final intDeprecated.process exited and dumped a core filestatic final intDeprecated.invoke the program directly, no copied envstatic final intDeprecated.invoke the program, replicating our environmentstatic final intDeprecated.find program on PATH, use our environmentstatic final intDeprecated.use the shell to invoke the programstatic final intDeprecated.use the shell to invoke the program, replicating our environmentstatic final intDeprecated.wait for the specified process to finishstatic final intDeprecated.Detachstatic final intDeprecated.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic longalloc(long cont) Deprecated.Allocate apr_proc_t structure from pool This is not an apr function.static intDeprecated.Create a new process and execute a new program within that process.static intdetach(int daemonize) Deprecated.Detach the process from the controlling terminal.static intfork(long[] proc, long cont) Deprecated.This is currently the only non-portable call in APR.static intkill(long proc, int sig) Deprecated.Terminate a process.static intwait(long proc, int[] exit, int waithow) Deprecated.Wait for a child process to diestatic intwaitAllProcs(long proc, int[] exit, int waithow, long pool) Deprecated.Wait for any current child process to die and return information about that child.
- 
Field Details- 
APR_SHELLCMpublic static final int APR_SHELLCMDeprecated.use the shell to invoke the program- See Also:
 
- 
APR_PROGRAMpublic static final int APR_PROGRAMDeprecated.invoke the program directly, no copied env- See Also:
 
- 
APR_PROGRAM_ENVpublic static final int APR_PROGRAM_ENVDeprecated.invoke the program, replicating our environment- See Also:
 
- 
APR_PROGRAM_PATHpublic static final int APR_PROGRAM_PATHDeprecated.find program on PATH, use our environment- See Also:
 
- 
APR_SHELLCMD_ENVpublic static final int APR_SHELLCMD_ENVDeprecated.use the shell to invoke the program, replicating our environment- See Also:
 
- 
APR_WAITpublic static final int APR_WAITDeprecated.wait for the specified process to finish- See Also:
 
- 
APR_NOWAITpublic static final int APR_NOWAITDeprecated.do not wait -- just see if it has finished- See Also:
 
- 
APR_PROC_EXITpublic static final int APR_PROC_EXITDeprecated.process exited normally- See Also:
 
- 
APR_PROC_SIGNALpublic static final int APR_PROC_SIGNALDeprecated.process exited due to a signal- See Also:
 
- 
APR_PROC_SIGNAL_COREpublic static final int APR_PROC_SIGNAL_COREDeprecated.process exited and dumped a core file- See Also:
 
- 
APR_NO_PIPEpublic static final int APR_NO_PIPEDeprecated.- See Also:
 
- 
APR_FULL_BLOCKpublic static final int APR_FULL_BLOCKDeprecated.- See Also:
 
- 
APR_FULL_NONBLOCKpublic static final int APR_FULL_NONBLOCKDeprecated.- See Also:
 
- 
APR_PARENT_BLOCKpublic static final int APR_PARENT_BLOCKDeprecated.- See Also:
 
- 
APR_CHILD_BLOCKpublic static final int APR_CHILD_BLOCKDeprecated.- See Also:
 
- 
APR_LIMIT_CPUpublic static final int APR_LIMIT_CPUDeprecated.- See Also:
 
- 
APR_LIMIT_MEMpublic static final int APR_LIMIT_MEMDeprecated.- See Also:
 
- 
APR_LIMIT_NPROCpublic static final int APR_LIMIT_NPROCDeprecated.- See Also:
 
- 
APR_LIMIT_NOFILEpublic static final int APR_LIMIT_NOFILEDeprecated.- See Also:
 
- 
APR_OC_REASON_DEATHpublic static final int APR_OC_REASON_DEATHDeprecated.child has died, caller must call unregister still- See Also:
 
- 
APR_OC_REASON_UNWRITABLEpublic static final int APR_OC_REASON_UNWRITABLEDeprecated.write_fd is unwritable- See Also:
 
- 
APR_OC_REASON_RESTARTpublic static final int APR_OC_REASON_RESTARTDeprecated.a restart is occurring, perform any necessary cleanup (including sending a special signal to child)- See Also:
 
- 
APR_OC_REASON_UNREGISTERpublic static final int APR_OC_REASON_UNREGISTERDeprecated.unregister has been called, do whatever is necessary (including kill the child)- See Also:
 
- 
APR_OC_REASON_LOSTpublic static final int APR_OC_REASON_LOSTDeprecated.somehow the child exited without us knowing ... buggy os?- See Also:
 
- 
APR_OC_REASON_RUNNINGpublic static final int APR_OC_REASON_RUNNINGDeprecated.a health check is occurring, for most maintenance functions this is a no-op.- See Also:
 
- 
APR_KILL_NEVERpublic static final int APR_KILL_NEVERDeprecated.process is never sent any signals- See Also:
 
- 
APR_KILL_ALWAYSpublic static final int APR_KILL_ALWAYSDeprecated.process is sent SIGKILL on apr_pool_t cleanup- See Also:
 
- 
APR_KILL_AFTER_TIMEOUTpublic static final int APR_KILL_AFTER_TIMEOUTDeprecated.SIGTERM, wait 3 seconds, SIGKILL- See Also:
 
- 
APR_JUST_WAITpublic static final int APR_JUST_WAITDeprecated.wait forever for the process to complete- See Also:
 
- 
APR_KILL_ONLY_ONCEpublic static final int APR_KILL_ONLY_ONCEDeprecated.send SIGTERM and then wait- See Also:
 
- 
APR_PROC_DETACH_FOREGROUNDpublic static final int APR_PROC_DETACH_FOREGROUNDDeprecated.- See Also:
 
- 
APR_PROC_DETACH_DAEMONIZEpublic static final int APR_PROC_DETACH_DAEMONIZEDeprecated.Do not detach- See Also:
 
- 
MAX_ARGS_SIZEpublic static final int MAX_ARGS_SIZEDeprecated.Detach- See Also:
 
- 
MAX_ENV_SIZEpublic static final int MAX_ENV_SIZEDeprecated.- See Also:
 
 
- 
- 
Constructor Details- 
Procpublic Proc()Deprecated.
 
- 
- 
Method Details- 
allocpublic static long alloc(long cont) Deprecated.Allocate apr_proc_t structure from pool This is not an apr function.- Parameters:
- cont- The pool to use.
- Returns:
- the pointer
 
- 
forkpublic static int fork(long[] proc, long cont) Deprecated.This is currently the only non-portable call in APR. This executes a standard unix fork.- Parameters:
- proc- The resulting process handle.
- cont- The pool to use.
- Returns:
- APR_INCHILD for the child, and APR_INPARENT for the parent or an error.
 
- 
createpublic static int create(long proc, String progname, String[] args, String[] env, long attr, long pool) Deprecated.Create a new process and execute a new program within that process. This function returns without waiting for the new process to terminate; use apr_proc_wait for that.- Parameters:
- proc- The process handle
- progname- The program to run
- args- The arguments to pass to the new program. The first one should be the program name.
- env- The new environment table for the new process. This should be a list of NULL-terminated strings. This argument is ignored for APR_PROGRAM_ENV, APR_PROGRAM_PATH, and APR_SHELLCMD_ENV types of commands.
- attr- The procattr we should use to determine how to create the new process
- pool- The pool to use.
- Returns:
- The resulting process handle.
 
- 
waitpublic static int wait(long proc, int[] exit, int waithow) Deprecated.Wait for a child process to die- Parameters:
- proc- The process handle that corresponds to the desired child process
- exit- exit[0] The returned exit status of the child, if a child process dies, or the signal that caused the child to die. On platforms that don't support obtaining this information, the status parameter will be returned as APR_ENOTIMPL. exit[1] Why the child died, the bitwise or of:- APR_PROC_EXIT -- process terminated normally APR_PROC_SIGNAL -- process was killed by a signal APR_PROC_SIGNAL_CORE -- process was killed by a signal, and generated a core dump.
- waithow- How should we wait. One of:- APR_WAIT -- block until the child process dies. APR_NOWAIT -- return immediately regardless of if the child is dead or not.
- Returns:
- The childs status is in the return code to this process.  It is one of:
 APR_CHILD_DONE -- child is no longer running. APR_CHILD_NOTDONE -- child is still running. 
 
- 
waitAllProcspublic static int waitAllProcs(long proc, int[] exit, int waithow, long pool) Deprecated.Wait for any current child process to die and return information about that child.- Parameters:
- proc- Pointer to NULL on entry, will be filled out with child's information
- exit- exit[0] The returned exit status of the child, if a child process dies, or the signal that caused the child to die. On platforms that don't support obtaining this information, the status parameter will be returned as APR_ENOTIMPL. exit[1] Why the child died, the bitwise or of:- APR_PROC_EXIT -- process terminated normally APR_PROC_SIGNAL -- process was killed by a signal APR_PROC_SIGNAL_CORE -- process was killed by a signal, and generated a core dump.
- waithow- How should we wait. One of:- APR_WAIT -- block until the child process dies. APR_NOWAIT -- return immediately regardless of if the child is dead or not.
- pool- Pool to allocate child information out of.
- Returns:
- the operation status
 
- 
detachpublic static int detach(int daemonize) Deprecated.Detach the process from the controlling terminal.- Parameters:
- daemonize- set to non-zero if the process should daemonize and become a background process, else it will stay in the foreground.
- Returns:
- the operation status
 
- 
killpublic static int kill(long proc, int sig) Deprecated.Terminate a process.- Parameters:
- proc- The process to terminate.
- sig- How to kill the process.
- Returns:
- the operation status
 
 
-