From 91bbf5817d71b7f17180f028f8eb6b547296e55f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 23 May 2012 12:54:00 -0400 Subject: [PATCH] In Solaris 11, /dev/pts under the "dev" filesystem, not "devices". Update tty_is_devpts() to match so we can determine when the tty has been reused. --HG-- branch : 1.7 --- check.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check.c b/check.c index 2b3ee053c..f1d2d8bd8 100644 --- a/check.c +++ b/check.c @@ -681,9 +681,9 @@ remove_timestamp(remove) } /* - * Returns TRUE if tty lives on a devpts or /devices filesystem, else FALSE. - * Unlike most filesystems, the ctime of devpts nodes is not updated when - * the device node is written to, only when the inode's status changes, + * Returns TRUE if tty lives on a devpts, /dev or /devices filesystem, else + * FALSE. Unlike most filesystems, the ctime of devpts nodes is not updated + * when the device node is written to, only when the inode's status changes, * typically via the chmod, chown, link, rename, or utimes system calls. * Since the ctime is "stable" in this case, we can stash it the tty ticket * file and use it to determine whether the tty ticket file is stale. @@ -708,7 +708,7 @@ tty_is_devpts(tty) struct statvfs sfs; if (statvfs(tty, &sfs) == 0) { - if (strcmp(sfs.f_fstr, "devices") == 0) + if (strcmp(sfs.f_fstr, "dev") == 0 || strcmp(sfs.f_fstr, "devices") == 0) retval = TRUE; } #endif /* __linux__ */ -- 2.40.0