🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #1452

Trouble with shmget (he

#1452
From: Steve Upp
Date: Wed, 06 Sep 1989 21:17
42 lines
1484 bytes
I need some help trying to get shmget to work on a Sun 3/60 running SunOS
4.0.3.  This same program runs just fine on a Sun 3/50 running SunOS 3.5.
I don't see any difference in the documentation between the two systems,
however something has changed.

I get the following as an error message:

$ a.out
shmget failed: Invalid argument

If you have any ideas I'd appreciate hearing from you.

Thanks for your help!

Steve Upp				InterNet:	supp@tank.uchicago.edu
University of Chicago			
Computing Organizations      	        

*--------------------------------- cut here ---------------------------------
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <errno.h>
#include <stdio.h>


main ()
{
	int shmid, shmflag, size;
	key_t key;

	key 	= IPC_PRIVATE;
 	shmflag = IPC_CREAT | 0400 | 0200;
 	size 	= sizeof(int);

	if((shmid = shmget(key, size, shmflag)) < 0)
	{
		perror("shmget failed");
		exit(1);
	}
	printf("shmget successful\n");
}
Technical Details
Message-ID: <5301@tank.uchicago.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!ogccse!blake!milton!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!ogccse!blake!milton!uw-beaver!rice!sun-spots-request
From: supp@tank.uchicago.edu (Steve Upp)
Newsgroups: comp.sys.sun
Subject: Trouble with shmget (he
Keywords: Miscellaneous
Message-ID: <5301@tank.uchicago.edu>
Date: 6 Sep 89 21:17:16 GMT
Sender: root@rice.edu
Organization: University of Chicago
Lines: 42
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 8, Issue 123, message 15 of 17