Thread: wts is the type of key in msgget

  1. #1
    kotin
    Join Date
    Oct 2009
    Posts
    132

    wts is the type of key in msgget

    hi in msgget(key _t key,int msgflg) wt is the value of key ? is it integer or character or string?

    please any one can give explanation on this?

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by MK27 View Post
    That page doesn't answer the question at all. We still have no idea what "key_t" is (well, I do, but that's only because I already did). The man page sucks, honestly.

    key_t is just a number.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    kotin
    Join Date
    Oct 2009
    Posts
    132
    Hi ,

    from previous replys, i cant assign any name to message queue ? i will assign only integer value as key?

    i cant assign like msgget("name1",IPC_CREATE);

    please post your suggestions

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by nkrao123@gmail. View Post
    i cant assign any name to message queue ? i will assign only integer value as key?

    i cant assign like msgget("name1",IPC_CREATE);
    Quote Originally Posted by brewbuck View Post
    That page doesn't answer the question at all. We still have no idea what "key_t" is
    "The msgget() function returns the message queue identifier associated with key. A message queue identifier and an associated message queue and data structure are created if key is equal to IPC_PRIVATE"

    Sorry! My ungodly intuition sees AN INTEGER here in the first sentence...
    Last edited by MK27; 12-05-2009 at 10:25 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  2. typename madness
    By zxcv in forum C++ Programming
    Replies: 4
    Last Post: 05-13-2006, 10:35 PM
  3. Function to check memory left from malloc and free?
    By Lechx in forum C Programming
    Replies: 4
    Last Post: 04-24-2006, 05:45 AM
  4. Erros in Utility Header File
    By silk.odyssey in forum C++ Programming
    Replies: 4
    Last Post: 12-22-2003, 06:17 AM
  5. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM