1 17 18 package org.apache.tomcat.jni; 19 20 25 26 public class Proc { 27 28 31 public static final int APR_SHELLCM = 0; 32 public static final int APR_PROGRAM = 1; 33 public static final int APR_PROGRAM_ENV = 2; 34 public static final int APR_PROGRAM_PATH = 3; 35 public static final int APR_SHELLCMD_ENV = 4; 38 39 42 public static final int APR_WAIT = 0; 43 public static final int APR_NOWAIT = 1; 44 45 48 public static final int APR_PROC_EXIT = 1; 49 public static final int APR_PROC_SIGNAL = 2; 50 public static final int APR_PROC_SIGNAL_CORE = 4; 51 52 public static final int APR_NO_PIPE = 0; 53 public static final int APR_FULL_BLOCK = 1; 54 public static final int APR_FULL_NONBLOCK = 2; 55 public static final int APR_PARENT_BLOCK = 3; 56 public static final int APR_CHILD_BLOCK = 4; 57 58 public static final int APR_LIMIT_CPU = 0; 59 public static final int APR_LIMIT_MEM = 1; 60 public static final int APR_LIMIT_NPROC = 2; 61 public static final int APR_LIMIT_NOFILE = 3; 62 63 64 65 public static final int APR_OC_REASON_DEATH = 0; 66 67 public static final int APR_OC_REASON_UNWRITABLE = 1; 68 71 public static final int APR_OC_REASON_RESTART = 2; 72 75 public static final int APR_OC_REASON_UNREGISTER = 3; 76 77 public static final int APR_OC_REASON_LOST = 4; 78 81 public static final int APR_OC_REASON_RUNNING = 5; 82 83 84 85 public static final int APR_KILL_NEVER = 0; 86 87 public static final int APR_KILL_ALWAYS = 1; 88 89 public static final int APR_KILL_AFTER_TIMEOUT = 2; 90 91 public static final int APR_JUST_WAIT = 3; 92 93 public static final int APR_KILL_ONLY_ONCE = 4; 94 95 public static final int APR_PROC_DETACH_FOREGROUND = 0; 96 public static final int APR_PROC_DETACH_DAEMONIZE = 1; 97 98 99 public static final int MAX_ARGS_SIZE = 1024; 100 101 public static final int MAX_ENV_SIZE = 1024; 102 103 108 public static native long alloc(long cont); 109 110 118 public static native int fork(long [] proc, long cont); 119 120 136 public static native int create(long proc, String progname, 137 String [] args, String [] env, 138 long attr, long pool); 139 140 166 public static native int wait(long proc, int [] exit, int waithow); 167 168 192 public static native int waitAllProcs(long proc, int [] exit, 193 int waithow, long pool); 194 195 201 public static native int detach(int daemonize); 202 203 208 public static native int kill(long proc, int sig); 209 210 } 211 | Popular Tags |