Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - support of shmget api: (4 Items)
   
support of shmget api  
I am trying to access the shared memory created in qnx using scripting language(perl).
But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of 
supporting it.
Re: support of shmget api  
You can try running the s5ipc manager and linking perl against libs5ipc.
It's in pkgsrc under sysutils/s5ipc.


http://community.qnx.com/sf/projects/pkgsrc

On Thu, Jan 17, 2013 at 07:31:03AM -0500, Ashwini Dubey wrote:
> I am trying to access the shared memory created in qnx using scripting language(perl).
> But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of 
supporting it.
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post98631
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: support of shmget api  
Do you have a sample perl script?
Re: support of shmget api  
Script is

#!/usr/bin/perl
 $file_shmem = "/home/Vishal_Home/bolts";
 $size_shmem = 18640;
  open( F, "./ftok $file_shmem 1 |" );
  $s1 = <F>;
  close F;
  chomp $s1;
  $ipckey = "0x$s1";
  print "IPC-KEY of ($file_shmem) is $ipckey \n";
  $idshm = shmget( $ipckey, $size_shmem, 0666  ) || die "\n Creation of shared memory failed $! \n";
  print "IPC-SHMEM: id $idshm \n";
  shmread( $idshm, $data_shmem, 0, $size_shmem )  || warn "\n\n Error reading shared-memory: $! \n";

Error is-

$ ./myshm.pl
IPC-KEY of (/home/Vishal_Home/bolts) is 0x
System V IPC is not implemented on this machine at ./myshm.pl line 10.
$