aboutsummaryrefslogtreecommitdiff
path: root/libbb/getpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/getpty.c')
-rw-r--r--libbb/getpty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/getpty.c b/libbb/getpty.c
index 435e4d09f..391d729f2 100644
--- a/libbb/getpty.c
+++ b/libbb/getpty.c
@@ -16,7 +16,7 @@ int FAST_FUNC xgetpty(char *line)
#if ENABLE_FEATURE_DEVPTS
p = open("/dev/ptmx", O_RDWR);
- if (p > 0) {
+ if (p >= 0) {
grantpt(p); /* chmod+chown corresponding slave pty */
unlockpt(p); /* (what does this do?) */
# ifndef HAVE_PTSNAME_R