From 3ecebc0f616ff4c29d49c3f003b991a61eeeeb13 Mon Sep 17 00:00:00 2001 From: "Kurt A. Schoens" Date: Thu, 9 Oct 1980 21:41:18 -0800 Subject: [PATCH] quit() does nothing if in read only mode SCCS-vsn: usr.bin/mail/quit.c 1.2 --- usr/src/usr.bin/mail/quit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr/src/usr.bin/mail/quit.c b/usr/src/usr.bin/mail/quit.c index 4dc515c551..33abe0a633 100644 --- a/usr/src/usr.bin/mail/quit.c +++ b/usr/src/usr.bin/mail/quit.c @@ -9,7 +9,7 @@ * Termination processing. */ -static char *SccsId = "@(#)quit.c 1.1 %G%"; +static char *SccsId = "@(#)quit.c 1.2 %G%"; /* * Save all of the undetermined messages at the top of "mbox" @@ -26,6 +26,13 @@ quit() extern char tempQuit[], tempResid[]; struct stat minfo; + /* + * If we are read only, we can't do anything, + * so just return quickly. + */ + + if (readonly) + return; /* * See if there any messages to save in mbox. If no, we * can save copying mbox to /tmp and back. -- 2.20.1