lkml.org 
[lkml]   [2005]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectquery...
   Hi,
I am Creating a posix message queue using the following code.


#include <stdio.h>
#include <stdlib.h>
#include <mqueue.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

int main(int argc,char *argv[])
{
mqd_t mq_des;
mq_des = mq_open(argv[1],O_CREAT | O_RDWR | O_EXCL,S_IRUSR | S_IWUSR
| S_IRGRP | S_IROTH , NULL);
if(mq_des < 0)
{
printf("Unable To Create MsgQ\n");
perror("mq_open");
return mq_des;
}
printf("MsgQ is Opened With Descriptor : %d\n",mq_des);
return mq_des;
}


and I after compiling I am giving

./a.out /root/Desktop/msgq1


But It is giving as unable to create message queue and showing error as
'permission denied'

Would you please help me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-09 12:39    [W:0.039 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site