1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.lang;
28 
29 
30 @SuppressWarnings({"unchecked", "deprecation", "all"})
31 final class UNIXProcess extends java.lang.Process {
32 
UNIXProcess( byte[] prog, byte[] argBlock, int argc, byte[] envBlock, int envc, byte[] dir, int[] fds, boolean redirectErrorStream)33     UNIXProcess(
34             byte[] prog,
35             byte[] argBlock,
36             int argc,
37             byte[] envBlock,
38             int envc,
39             byte[] dir,
40             int[] fds,
41             boolean redirectErrorStream)
42             throws java.io.IOException {
43         throw new RuntimeException("Stub!");
44     }
45 
waitForProcessExit(int pid)46     private native int waitForProcessExit(int pid);
47 
forkAndExec( byte[] prog, byte[] argBlock, int argc, byte[] envBlock, int envc, byte[] dir, int[] fds, boolean redirectErrorStream)48     private native int forkAndExec(
49             byte[] prog,
50             byte[] argBlock,
51             int argc,
52             byte[] envBlock,
53             int envc,
54             byte[] dir,
55             int[] fds,
56             boolean redirectErrorStream)
57             throws java.io.IOException;
58 
newFileDescriptor(int fd)59     static java.io.FileDescriptor newFileDescriptor(int fd) {
60         throw new RuntimeException("Stub!");
61     }
62 
initStreams(int[] fds)63     void initStreams(int[] fds) throws java.io.IOException {
64         throw new RuntimeException("Stub!");
65     }
66 
processExited(int exitcode)67     void processExited(int exitcode) {
68         throw new RuntimeException("Stub!");
69     }
70 
getOutputStream()71     public java.io.OutputStream getOutputStream() {
72         throw new RuntimeException("Stub!");
73     }
74 
getInputStream()75     public java.io.InputStream getInputStream() {
76         throw new RuntimeException("Stub!");
77     }
78 
getErrorStream()79     public java.io.InputStream getErrorStream() {
80         throw new RuntimeException("Stub!");
81     }
82 
waitFor()83     public synchronized int waitFor() throws java.lang.InterruptedException {
84         throw new RuntimeException("Stub!");
85     }
86 
exitValue()87     public synchronized int exitValue() {
88         throw new RuntimeException("Stub!");
89     }
90 
destroyProcess(int pid)91     private static native void destroyProcess(int pid);
92 
destroy()93     public void destroy() {
94         throw new RuntimeException("Stub!");
95     }
96 
toString()97     public java.lang.String toString() {
98         throw new RuntimeException("Stub!");
99     }
100 
initIDs()101     private static native void initIDs();
102 
103     private int exitcode;
104 
105     private boolean hasExited;
106 
107     @android.compat.annotation.UnsupportedAppUsage private final int pid;
108 
109     {
110         pid = 0;
111     }
112 
113     private static final java.util.concurrent.Executor processReaperExecutor;
114 
115     static {
116         processReaperExecutor = null;
117     }
118 
119     private java.io.InputStream stderr;
120 
121     private java.io.OutputStream stdin;
122 
123     private java.io.InputStream stdout;
124 
125     @SuppressWarnings({"unchecked", "deprecation", "all"})
126     static class ProcessPipeInputStream extends java.io.BufferedInputStream {
127 
ProcessPipeInputStream(int fd)128         ProcessPipeInputStream(int fd) {
129             super((java.io.InputStream) null);
130             throw new RuntimeException("Stub!");
131         }
132 
drainInputStream(java.io.InputStream in)133         private static byte[] drainInputStream(java.io.InputStream in) throws java.io.IOException {
134             throw new RuntimeException("Stub!");
135         }
136 
processExited()137         synchronized void processExited() {
138             throw new RuntimeException("Stub!");
139         }
140     }
141 
142     @SuppressWarnings({"unchecked", "deprecation", "all"})
143     static class ProcessPipeOutputStream extends java.io.BufferedOutputStream {
144 
ProcessPipeOutputStream(int fd)145         ProcessPipeOutputStream(int fd) {
146             super((java.io.OutputStream) null);
147             throw new RuntimeException("Stub!");
148         }
149 
processExited()150         synchronized void processExited() {
151             throw new RuntimeException("Stub!");
152         }
153     }
154 
155     @SuppressWarnings({"unchecked", "deprecation", "all"})
156     private static class ProcessReaperThreadFactory implements java.util.concurrent.ThreadFactory {
157 
ProcessReaperThreadFactory()158         private ProcessReaperThreadFactory() {
159             throw new RuntimeException("Stub!");
160         }
161 
getRootThreadGroup()162         private static java.lang.ThreadGroup getRootThreadGroup() {
163             throw new RuntimeException("Stub!");
164         }
165 
newThread(java.lang.Runnable grimReaper)166         public java.lang.Thread newThread(java.lang.Runnable grimReaper) {
167             throw new RuntimeException("Stub!");
168         }
169 
170         private static final java.lang.ThreadGroup group;
171 
172         static {
173             group = null;
174         }
175     }
176 }
177