summaryrefslogtreecommitdiff
path: root/master.c
diff options
context:
space:
mode:
authorNed T. Crigler <crigler@users.sourceforge.net>2016-05-08 17:43:28 -0700
committerNed T. Crigler <crigler@users.sourceforge.net>2016-05-08 17:43:28 -0700
commit487b802c4a824544393fa04643e742cf3dfadde2 (patch)
treead7004c4dac21ea83ca8cdf0077f3b8167aef7ea /master.c
parent35219aa11c9702c9c527ed14c3c5b69344f56ec6 (diff)
Improve error message when dtach can't find a pty.
Also add some documentation mentioning the devices that dtach usually needs access to on Linux. Bug reported by David Bremner at https://bugs.debian.org/804944
Diffstat (limited to 'master.c')
-rw-r--r--master.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/master.c b/master.c
index 90b6683..1c41bc1 100644
--- a/master.c
+++ b/master.c
@@ -455,7 +455,10 @@ master_process(int s, char **argv, int waitattach, int statusfd)
{
if (statusfd != -1)
dup2(statusfd, 1);
- printf("%s: init_pty: %s\n", progname, strerror(errno));
+ if (errno == ENOENT)
+ printf("%s: Could not find a pty.\n", progname);
+ else
+ printf("%s: init_pty: %s\n", progname, strerror(errno));
exit(1);
}