diff options
Diffstat (limited to 'bin/rcp/util.c')
-rw-r--r-- | bin/rcp/util.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/rcp/util.c b/bin/rcp/util.c index cf86fa02122..e57cc00e97c 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.7 2001/01/15 19:32:13 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.8 2001/01/15 19:54:56 deraadt Exp $ */ /* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.7 2001/01/15 19:32:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.8 2001/01/15 19:54:56 deraadt Exp $"; #endif #endif /* not lint */ @@ -171,7 +171,13 @@ void lostconn(signo) int signo; { - if (!iamremote) - warnx("lost connection"); + extern char *__progname; + char buf[1024]; + + if (!iamremote) { + strlcpy(buf, __progname, sizeof buf); + strlcat(buf, ": lost connection\n", sizeof buf); + write(STDERR_FILENO, buf, strlen(buf)); + } _exit(1); } |