PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Naveen_Rajavasireddy at ACML dot COM
Subject: Shared Memory
Date: Nov 20 1997 2:44PM


11-20-97 10:44 AM
Naveen Rajavasireddy @ ALLIANCE CAPITAL
Naveen Rajavasireddy @ ALLIANCE CAPITAL
Naveen Rajavasireddy @ ALLIANCE CAPITAL
11-20-97 10:44 AM
11-20-97 10:44 AM
I get the following error implementing shared memory in my programs.

Can't locate ipc.h in @INC ( did you run h2ph ).
I have the ipc.ph and shm.ph files in the
/opt/utils/perl5/lib/site_perl/sun4-solaris/sys/ipc and shm.ph files

Here is the snippet of my code
#!/opt/utils/perl5/bin/perl

require "ipc.ph";
require "shm.ph";


$IPC_PRIVATE = 0;
$IPC_RMID = 0;
$size = 2000;
$id = shmget($IPC_PRIVATE,$size,0777);
die if !defined($key);

print "Key is $key\n";

open (INPUT, "tmp2.pl $key |") || die "Unable to start tmp2.pl\n";

while ($in = )
{
     if ($in +~ /^^\*\*/)
     {
          print "End of result set\n";
          shmctl($id, $IPC_RMID, 0);
          exit;
     }

     print "$in\n";
     shmwrite($id, $in,0,length($in));
}

Thank you,
Naveen Rajavasireddy, :-)