Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3617bdf3 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am f6304733: Merge "Fix "ptsname is not thread-safe; use ptsname_r instead" build break."

* commit 'f6304733':
  Fix "ptsname is not thread-safe; use ptsname_r instead" build break.
parents 95ec9ae2 f6304733
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -477,7 +477,6 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
    pid_t pid;
    int parent_ptty;
    int child_ptty;
    char *child_devname = NULL;
    struct sigaction intact;
    struct sigaction quitact;
    sigset_t blockset;
@@ -498,8 +497,9 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
        goto err_open;
    }

    char child_devname[64];
    if (grantpt(parent_ptty) || unlockpt(parent_ptty) ||
            ((child_devname = (char*)ptsname(parent_ptty)) == 0)) {
            ptsname_r(parent_ptty, child_devname, sizeof(child_devname)) != 0) {
        ERROR("Problem with /dev/ptmx\n");
        rc = -1;
        goto err_ptty;