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

Confusing overloads for os::open

XMLWordPrintable

    • b05
    • generic
    • generic

      os::open presently has the following overloads:

        int open(const char* pathname, int flags, int mode);
        FILE* open(int fd, const char* mode);

      The present 2-arg overload is really fdopen, and should be renamed accordingly. Two overloads in the same "namespace" with completely different semantics is just confusing, even more so with JDK-8218856.

      (This suggestion came out of the review for JDK-8218811.)

            hseigel Harold Seigel (Inactive)
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: