Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132541

(process) ProcessBuilder support for redirection to discard output

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b84

      Backports

        Description

        From core-libs: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-July/034639.html

        One very small yet very useful potential enhancement.

        It would be very handy to be able to specify a NULL/bit-bucket source/destination for pipes. For the target process' input, the user can generally (I believe) just close the stream, but for output, there isn't really a good option. While this is possible to achieve by redirecting to /dev/null on UNIX-likes and NUL (iirc) on Windows, having to do platform detection to decide where this device is seems overly cumbersome.

        Having a ProcessBuilder.Redirect#DISCARD or similar would be quite useful, and should be fairly straightforward.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rriggs Roger Riggs
                Reporter:
                rriggs Roger Riggs
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: