Find the answer to your Linux question:
Results 1 to 5 of 5
hii can anyone tell what does mq_open returns?? whenever i am using mq_open it always returns 3. what is the problem?? Thanxs in advance Mohit...
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    3

    Exclamation what does mq_open() returns

    hii
    can anyone tell what does mq_open returns?? whenever i am using mq_open it always returns 3. what is the problem??
    Thanxs in advance
    Mohit

  2. #2
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109

  3. #3
    Just Joined!
    Join Date
    May 2008
    Posts
    3
    Hi, thanxs for ur reply but man page was the first thing that i searched and couldnt get a satisfactory reply... pls try something else and reply..

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by mohit3884 View Post
    Hi, thanxs for ur reply but man page was the first thing that i searched and couldnt get a satisfactory reply... pls try something else and reply..
    Then you will also have to describe what's the thing you don't understand.

    You are trying to open a message queue descriptor, and that's what that function return: a pointer to one of those (data type: mqd_t). Just like fopen return a pointer to a FILE data type.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Quoth the highly esteemed i92guboj:
    what that function return: a pointer to one of those (data type: mqd_t). Just like fopen return a pointer to a FILE data type.
    That's essentially correct, but it's even more like open(), which returns a small integer, not a conventional pointer. The mqd_t is a small integer, as mohit3884 discovered, which looks (but isn't) quite unuseful, which was probably the source of his confusion.
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...