summaryrefslogtreecommitdiff
path: root/clients/zleave
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-04-19 12:54:08 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-04-19 12:54:08 +0000
commit5f0af1043a0f2bfc2b4103fc9cd9f8a7d5cc8460 (patch)
tree54cbc8edcabe3f1fad8c1f15ffc424f903b10e75 /clients/zleave
parentf7186fa998f52a6929f72693e9b0a137c14e4aca (diff)
fix problem with zleave exiting when run on a tty with no utmp entry
(e.g. X terminal window)
Diffstat (limited to 'clients/zleave')
-rw-r--r--clients/zleave/zleave.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/clients/zleave/zleave.c b/clients/zleave/zleave.c
index b9bb3f2..7baf53d 100644
--- a/clients/zleave/zleave.c
+++ b/clients/zleave/zleave.c
@@ -355,11 +355,13 @@ long secs;
secs -= n;
if (n > 0)
sleep((unsigned) n);
- l = getlogin();
- if (l == NULL)
+ if (!use_zephyr) {
+ l = getlogin();
+ if (l == NULL)
exit(0);
- if (!use_zephyr && (strcmp(origlogin, l) != 0))
+ if (strcmp(origlogin, l) != 0)
exit(0);
+ }
}
}