home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_11 / 8n11051a < prev    next >
Text File  |  1990-09-18  |  443b  |  17 lines

  1.  
  2. int msqid;             /* Message queue identifier */
  3. key_t key=0x1024;      /* Name of message queue    */
  4.  
  5. /* Obtain a message queue identifier.  If the
  6.  * message queue doesn't exist, create it.
  7. */
  8. if ((msqid=msgget(key, 0660 | IPC_CREAT)) == -1)  {
  9.     /* The perror(3C) function prints the 
  10.      * text of the error number contained 
  11.      * in the external integer errno.
  12.     */
  13.      perror("msgget() failed: ");
  14.      return(-1);
  15. }
  16.  
  17.