IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

msgctl (2)

MSGCTL(2)                  Linux Programmer's Manual                 MSGCTL(2)



NAME
       msgctl - message control operations

SYNOPSIS
       #include<sys/types.h>
       #include<sys/ipc.h>
       #include<sys/msg.h>

       intmsgctl(int msqid,int cmd,structmsqid_ds*buf);

DESCRIPTION
       This  function  performs  the control operation specified by cmd on the
       message queue with identifier msqid.  Legal values for cmd are:

       IPC_STAT
              Copy info from the message queue data structure associated  with
              msqid  into  the  structure  pointed to by buf.  The caller must
              have read permission on the message queue.

       IPC_SET
              Write the values of  some  members  of  the  msqid_ds  structure
              pointed  to by buf to the message queue data structure, updating
              also its msg_ctime member.  The following members of the  struc-
              ture can be updated:

                   msg_perm.uid
                   msg_perm.gid
                   msg_perm.mode  /* only lowest 9-bits */
                   msg_qbytes

              The calling process must have appropriate (probably, root) priv-
              ileges or its effective user-ID must  be  that  of  the  creator
              (msg_perm.cuid)  or  owner  (msg_perm.uid) of the message queue.
              Appropriate (probably, root) privileges are  required  to  raise
              the msg_qbytes value beyond the system parameter MSGMNB.

       IPC_RMID
              Immediately  remove  the  message  queue and its associated data
              structure, awakening all waiting  reader  and  writer  processes
              (with an error return and errno set to EIDRM).  The calling pro-
              cess must have appropriate (probably, root)  privileges  or  its
              effective user-ID must be either that of the creator or owner of
              the message queue.

RETURNVALUE
       On success, the return value will be 0, otherwise -1 with  errno  indi-
       cating the error.

ERRORS
       On failure, errno is set to one of the following:

       EACCES     The  argument  cmd is equal to IPC_STAT but the calling pro-
                  cess does not have read  permission  on  the  message  queue
                  msqid.

       EFAULT     The  argument cmd has the value IPC_SET or IPC_STAT, but the
                  address pointed to by buf isn't accessible.

       EIDRM      The message queue was removed.

       EINVAL     Invalid value for cmd or msqid.

       EPERM      The argument cmd has the value IPC_SET or IPC_RMID, but  the
                  calling  process  has insufficient privileges to execute the
                  command.

NOTES
       The IPC_INFO, MSG_STAT and MSG_INFO  control  calls  are  used  by  the
       ipcs(8)  program to provide information on allocated resources.  In the
       future these may be modified as needed or moved to a proc  file  system
       interface.

       Various  fields  in  a  struct msqid_ds were shorts under Linux 2.2 and
       have become longs under Linux 2.4. To take advantage of this, a  recom-
       pilation  under glibc-2.1.91 or later should suffice.  (The kernel dis-
       tinguishes old and new calls by a IPC_64 flag in cmd.)

CONFORMINGTO
       SVr4, SVID.  SVID does not document the EIDRM error condition.

SEEALSO
       ipc(5), msgget(2), msgsnd(2), msgrcv(2)



Linux 2.4.1                       2001-02-18                         MSGCTL(2)

_Exitgetsockoptoutwshmat
_exitgettidoutw_pshmctl
_llseekgettimeofdaypauseshmdt
_newselectgetuidpersonalityshmget
_sysctlgttypipeshmop
acceptidlepivot_rootshutdown
accessinbpollsigaction
acctinb_pprctlsigaltstack
adjtimexinlpreadsigblock
afs_syscallinl_pprofsiggetmask
alarminsbpselectsigmask
alloc_hugepagesinslptracesignal
arch_prctlinswpwritesigpause
bdflushintroquotactlsigpending
bindinwreadsigprocmask
breakinw_preaddirsigqueue
brkioctlreadlinksigreturn
cacheflushioctl_listreadvsigsetmask
capgetiopermrebootsigsuspend
capsetioplrecvsigtimedwait
chdiripcrecvfromsigvec
chmodkillrecvmsgsigwaitinfo
chownkillpgrenamesocket
chrootlchownrmdirsocketcall
clonelinksbrksocketpair
closelistensched_get_priority_maxssetmask
connectllseeksched_get_priority_minstat
creatlocksched_getaffinitystatfs
duplseeksched_getparamstime
dup2lstatsched_getschedulerstty
execvemadvisesched_rr_get_intervalswapoff
exitmincoresched_setaffinityswapon
fchdirmkdirsched_setparamsymlink
fchmodmknodsched_setschedulersync
fchownmlocksched_yieldsyscall
fcntlmlockallselectsyscalls
fdatasyncmmapselect_tutsysctl
flockmmap2semctlsysfs
forkmodify_ldtsemgetsysinfo
free_hugepagesmountsemopsyslog
fstatmprotectsendtime
fstatfsmpxsendfiletimes
fsyncmremapsendmsgtkill
ftruncatemsgctlsendtotruncate
futexmsggetsetcontextumask
getcontextmsgopsetdomainnameumount
getdentsmsgrcvsetegidumount2
getdomainnamemsgsndseteuiduname
getdtablesizemsyncsetfsgidundocumented
getegidmunlocksetfsuidunimplemented
geteuidmunlockallsetgidunlink
getgidmunmapsetgroupsuselib
getgroupsnanosleepsethostidustat
gethostidnfsservctlsethostnameutime
gethostnamenicesetitimerutimes
getitimerobsoletesetpgidvfork
getpagesizeoldfstatsetpgrpvhangup
getpeernameoldlstatsetpriorityvm86
getpgidoldoldunamesetregidwait
getpgrpoldstatsetresgidwait3
getpidoldunamesetresuidwait4
getppidopensetreuidwaitpid
getpriorityoutbsetrlimitwrite
getresgidoutb_psetsidwritev
getresuidoutlsetsockopt 
getrlimitoutl_psettimeofday 
getrusageoutsbsetuid 
getsidoutslsetup 


Linux Kernel 2.4 2.4.37.7
Linux Kernel
JEdit 4.3pre18
Programmers text editor
ImageMagick 6.5.7.5
ImageMagick image processing studio
Krusader 2.1.0-beta1
Twin-Panel filemanager for KDE3
LilyPond 2.13.7
Music typesetter.
KDevelop 4.0 beta6
Integrated Development Environment for Unix/X11
KDE 4.3.3
Powerful Open Source graphical desktop environment.
WebGUI 7.7.25
A fully featured content management system.
SimplyMEPIS 8.0.12
Run the Linux operating system from your CD or DVD drive
Fedora 12 rc1
Community-supported open source distribution
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info