Oops, supply mode bits to shmget(2).

This commit is contained in:
thorpej 1999-08-06 23:40:10 +00:00
parent 678ef99d81
commit 5839453a0d
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mmap.c,v 1.7 1999/08/06 23:01:41 thorpej Exp $ */
/* $NetBSD: mmap.c,v 1.8 1999/08/06 23:40:10 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -322,7 +322,8 @@ main(argc, argv)
printf(">>> CREATING SYSV SHM SEGMENT <<<\n");
if ((shmid = shmget(IPC_PRIVATE, npgs * pgsize, IPC_CREAT)) == -1)
if ((shmid = shmget(IPC_PRIVATE, npgs * pgsize,
IPC_CREAT|S_IRUSR|S_IWUSR)) == -1)
err(1, "shmget");
if ((addr = shmat(shmid, NULL, 0)) == (void *) -1)