Use MAP_SHARED, not MAP_PRIVATE.
This commit is contained in:
parent
28e8037334
commit
8f2250049f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: forward.c,v 1.11 1998/02/17 17:44:55 augustss Exp $ */
|
||||
/* $NetBSD: forward.c,v 1.12 1998/02/20 07:34:59 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: forward.c,v 1.11 1998/02/17 17:44:55 augustss Exp $");
|
||||
__RCSID("$NetBSD: forward.c,v 1.12 1998/02/20 07:34:59 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -254,9 +254,8 @@ rlines(fp, off, sbp)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((start = mmap(NULL, (size_t)size,
|
||||
PROT_READ, MAP_PRIVATE|MAP_FILE,
|
||||
fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||
if ((start = mmap(NULL, (size_t)size, PROT_READ,
|
||||
MAP_FILE|MAP_SHARED, fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||
err(0, "%s: %s", fname, strerror(EFBIG));
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: reverse.c,v 1.9 1998/02/17 17:44:55 augustss Exp $ */
|
||||
/* $NetBSD: reverse.c,v 1.10 1998/02/20 07:35:00 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: reverse.c,v 1.9 1998/02/17 17:44:55 augustss Exp $");
|
||||
__RCSID("$NetBSD: reverse.c,v 1.10 1998/02/20 07:35:00 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -130,9 +130,8 @@ r_reg(fp, style, off, sbp)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((start = mmap(NULL, (size_t)size,
|
||||
PROT_READ, MAP_PRIVATE|MAP_FILE,
|
||||
fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||
if ((start = mmap(NULL, (size_t)size, PROT_READ,
|
||||
MAP_FILE|MAP_SHARED, fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||
err(0, "%s: %s", fname, strerror(EFBIG));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user