NAME

IPC::SysV::ShmDS - Class to hold message queue data structures

SYNOPSIS

require IPC::SysV::ShmDS;

use IPC::SysV qw(IPC_STAT);
shmctl($qid,IPC_STAT,$shmid_ds);

$shmid_ds_obj = IPC::SysV::ShmDS->new($shmid_ds);
$shmid_ds_obj->perm_uid();
$shmid_ds_obj->perm_gid();
$shmid_ds_obj->perm_cuid();
$shmid_ds_obj->perm_cgid();
$shmid_ds_obj->perm_mode();
$shmid_ds_obj->segsz();
$shmid_ds_obj->lpid();
$shmid_ds_obj->cpid();
$shmid_ds_obj->nattch();
$shmid_ds_obj->atime();
$shmid_ds_obj->dtime();
$shmid_ds_obj->ctime();
$shmid_ds_obj->mode();
$shmid_ds_obj->set_uid_gid_mode($uid, $gid, $mode);
shmctl($qid,IPC_SET,$shmid_ds_obj->repack());

DESCRIPTION

This package provides a nice interface to a shared memory id data structure (SHMID_DS).

Given a string holding a SHMID_DS structure ($shmid_ds, for example as obtained with 'shmctl($qid,IPC_STAT,$shmid_ds)') you can get the object with

IPC::SysV::ShmDS->new($shmid_ds);

This object holds the individual parts of the data structure, and has the following access methods to access the items returned by IPC::SysV::shm_unpack_shmid_ds().

$shmid_ds_obj->perm_uid()
$shmid_ds_obj->perm_gid()
$shmid_ds_obj->perm_cuid()
$shmid_ds_obj->perm_cgid()
$shmid_ds_obj->perm_mode()
$shmid_ds_obj->qnum() 	
$shmid_ds_obj->qbytes() 	
$shmid_ds_obj->lspid() 	
$shmid_ds_obj->lrpid() 	
$shmid_ds_obj->stime() 	
$shmid_ds_obj->rtime() 	
$shmid_ds_obj->ctime()

In addition, one other access method, 'mode', accesses the perm_mode in a string readable format ('RW-RW-RW-').

$shmid_ds_obj->mode()

One updating method is available, 'set_uid_gid_mode' which takes three arguments, the UID, GID, and MODE, to update the parts perm_uid, perm_gid, and perm_mode respectively. Any of these can be undef, in which case the corresponding value is not altered. The perm_mode argument can be numeric or in 'RW-RW-RW-' format.

$shmid_ds_obj->set_uid_gid_mode_qbytes(UID,GID,MODE,QBYTES)

Finally, you can retrieve the packed object for the current state of the object with the repack method,

$shmid_ds_obj->repack()

This is useful to reset values.

Jack Shirazi

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Version 1.0

Base version.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 118:

Unknown directive: =AUTHOR

Around line 125:

Unknown directive: =MODIFICATION

Around line 127:

'=item' outside of any '=over'

=over without closing =back