Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!rex!uflorida!ziggy!screamer!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.perl Subject: Re: perl and shared memory ? Keywords: perl shm shared shm SysV Message-ID: <2700C004.1446@tct.uucp> Date: 26 Sep 90 14:49:39 GMT References: <1371@nixsin.UUCP> <1990Sep25.172747.17739@iwarp.intel.com> Organization: Teltronics/TCT, Sarasota, FL Lines: 29 According to merlyn@iwarp.intel.com (Randal Schwartz): >The coding was provided by someone who's name escapes me at the moment, >and Larry dropped it into the main code. I'm the culprit. Um, I mean, I'm the hero. >The new operators that deal with shared memory are shmctl, shmget, >shmread, and shmwrite. And you also get msgctl, msgget, msgrcv, and >msgsnd. Don't forget semctl, semget and semop. >Not being a big sys V fan, I don't know how useful all that stuff is, >but some of you are going to like it. :-) I wrote it because our local projects make significant use of SysV IPC, and Perl is a great prototyping tool. It's also quite handy for doing random things like "createq": eval 'exec /bin/perl -S $0 ${1+"$@"}' if 0; # Well, this is System V, after all :-( require 'sys/ipc.ph'; $id = msgget(&IPC_PRIVATE, &IPC_CREAT|0666&~umask); die "Can't create message queue: $!\n" unless defined($id); print "Created message queue $id\n"; -- Chip Salzenberg at Teltronics/TCT ,