summaryrefslogtreecommitdiff
path: root/usr.bin/vim/unix.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-10-15 08:08:14 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-10-15 08:08:14 +0000
commite00265d28cc6652a8217ee1b507193a110c7dbca (patch)
tree37431671f899e5f2f7959032c3a528e27ad01d83 /usr.bin/vim/unix.c
parentde6943fa3102c4cbd9f90ce346e14acf51fc66d4 (diff)
sync with the, uh, real 4.5 release.
Diffstat (limited to 'usr.bin/vim/unix.c')
-rw-r--r--usr.bin/vim/unix.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/vim/unix.c b/usr.bin/vim/unix.c
index 9d4a85ff761..b3cf805f6ec 100644
--- a/usr.bin/vim/unix.c
+++ b/usr.bin/vim/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.3 1996/10/14 03:55:32 downsj Exp $ */
+/* $OpenBSD: unix.c,v 1.4 1996/10/15 08:07:58 downsj Exp $ */
/* vi:set ts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
@@ -413,13 +413,12 @@ deathtrap SIGDEFARG(sigarg)
may_core_dump();
exit(7);
}
- if (entered)
+ if (entered++)
{
OUTSTR("Vim: Double signal, exiting\n");
flushbuf();
getout(1);
}
- ++entered;
sprintf((char *)IObuff, "Vim: Caught %s %s\n",
#ifdef SIGHASARG
@@ -2125,8 +2124,8 @@ call_shell(cmd, options)
RealWaitForChar(fromshell_fd, 10); ++read_count)
{
len = read(fromshell_fd, (char *)buffer,
- (size_t)BUFLEN);
- if (len == 0) /* end of file */
+ (size_t)(BUFLEN - 1));
+ if (len <= 0) /* end of file or error */
goto finished;
buffer[len] = NUL;
msg_outstr(buffer);