=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/lex.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/mail/lex.c 1997/07/22 06:46:20 1.9 --- src/usr.bin/mail/lex.c 1997/07/22 19:13:25 1.10 *************** *** 1,4 **** ! /* $OpenBSD: lex.c,v 1.9 1997/07/22 06:46:20 millert Exp $ */ /* $NetBSD: lex.c,v 1.10 1997/05/17 19:55:13 pk Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: lex.c,v 1.10 1997/07/22 19:13:25 millert Exp $ */ /* $NetBSD: lex.c,v 1.10 1997/05/17 19:55:13 pk Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; #else ! static char rcsid[] = "$OpenBSD: lex.c,v 1.9 1997/07/22 06:46:20 millert Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; #else ! static char rcsid[] = "$OpenBSD: lex.c,v 1.10 1997/07/22 19:13:25 millert Exp $"; #endif #endif /* not lint */ *************** *** 178,186 **** --- 178,189 ---- if (ibuf == NULL) return(-1); holdsigs(); + if (!spool_lock()) + return(-1); newsize = fsize(ibuf); /* make sure mail box has grown and is non-empty */ if (newsize == 0 || newsize <= mailsize) { + spool_unlock(); relsesigs(); return(newsize == mailsize ? 0 : -1); } *************** *** 188,193 **** --- 191,197 ---- setmsize(msgCount); mailsize = ftell(ibuf); (void)Fclose(ibuf); + spool_unlock(); relsesigs(); return(msgCount - omsgCount); }