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
|
* Copyright (c) 1991, 1993
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -254,9 +254,8 @@ rlines(fp, off, sbp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((start = mmap(NULL, (size_t)size,
|
if ((start = mmap(NULL, (size_t)size, PROT_READ,
|
||||||
PROT_READ, MAP_PRIVATE|MAP_FILE,
|
MAP_FILE|MAP_SHARED, fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||||
fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
|
||||||
err(0, "%s: %s", fname, strerror(EFBIG));
|
err(0, "%s: %s", fname, strerror(EFBIG));
|
||||||
return;
|
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
|
* Copyright (c) 1991, 1993
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -130,9 +130,8 @@ r_reg(fp, style, off, sbp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((start = mmap(NULL, (size_t)size,
|
if ((start = mmap(NULL, (size_t)size, PROT_READ,
|
||||||
PROT_READ, MAP_PRIVATE|MAP_FILE,
|
MAP_FILE|MAP_SHARED, fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
||||||
fileno(fp), (off_t)0)) == (caddr_t)-1) {
|
|
||||||
err(0, "%s: %s", fname, strerror(EFBIG));
|
err(0, "%s: %s", fname, strerror(EFBIG));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user