jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris
changeset 5787 a0af7b8e80ed
parent 5506 202f599c92aa
child 7668 d4a77089c587
equal deleted inserted replaced
5786:f60ef38202e7 5787:a0af7b8e80ed
    84                           redirectErrorStream);
    84                           redirectErrorStream);
    85 
    85 
    86         java.security.AccessController.doPrivileged(
    86         java.security.AccessController.doPrivileged(
    87         new java.security.PrivilegedAction<Void>() { public Void run() {
    87         new java.security.PrivilegedAction<Void>() { public Void run() {
    88             if (std_fds[0] == -1)
    88             if (std_fds[0] == -1)
    89                 stdin_stream = new ProcessBuilder.NullOutputStream();
    89                 stdin_stream = ProcessBuilder.NullOutputStream.INSTANCE;
    90             else {
    90             else {
    91                 FileDescriptor stdin_fd = new FileDescriptor();
    91                 FileDescriptor stdin_fd = new FileDescriptor();
    92                 fdAccess.set(stdin_fd, std_fds[0]);
    92                 fdAccess.set(stdin_fd, std_fds[0]);
    93                 stdin_stream = new BufferedOutputStream(
    93                 stdin_stream = new BufferedOutputStream(
    94                     new FileOutputStream(stdin_fd));
    94                     new FileOutputStream(stdin_fd));
    95             }
    95             }
    96 
    96 
    97             if (std_fds[1] == -1)
    97             if (std_fds[1] == -1)
    98                 stdout_stream = new ProcessBuilder.NullInputStream();
    98                 stdout_stream = ProcessBuilder.NullInputStream.INSTANCE;
    99             else {
    99             else {
   100                 FileDescriptor stdout_fd = new FileDescriptor();
   100                 FileDescriptor stdout_fd = new FileDescriptor();
   101                 fdAccess.set(stdout_fd, std_fds[1]);
   101                 fdAccess.set(stdout_fd, std_fds[1]);
   102                 stdout_inner_stream = new DeferredCloseInputStream(stdout_fd);
   102                 stdout_inner_stream = new DeferredCloseInputStream(stdout_fd);
   103                 stdout_stream = new BufferedInputStream(stdout_inner_stream);
   103                 stdout_stream = new BufferedInputStream(stdout_inner_stream);
   104             }
   104             }
   105 
   105 
   106             if (std_fds[2] == -1)
   106             if (std_fds[2] == -1)
   107                 stderr_stream = new ProcessBuilder.NullInputStream();
   107                 stderr_stream = ProcessBuilder.NullInputStream.INSTANCE;
   108             else {
   108             else {
   109                 FileDescriptor stderr_fd = new FileDescriptor();
   109                 FileDescriptor stderr_fd = new FileDescriptor();
   110                 fdAccess.set(stderr_fd, std_fds[2]);
   110                 fdAccess.set(stderr_fd, std_fds[2]);
   111                 stderr_stream = new DeferredCloseInputStream(stderr_fd);
   111                 stderr_stream = new DeferredCloseInputStream(stderr_fd);
   112             }
   112             }