Hi,
I have modified the bionic libc to include some of my POSIX calls line
mq_open, mq_send, etc. for my MIPS platform.
I have written a test app to test to open a message queue and the output is
a Permission denied.
Please find my test app code below:
/* name of the POSIX object referencing the queue */
#define MSGQOBJ_NAME "/myqueue123"
/* max length of a message (just for this process) */
#define MAX_MSG_LEN 70
int main(int argc, char *argv[]) {
mqd_t msgq_id;
unsigned int msgprio = 0;
pid_t my_pid = getpid();
char msgcontent[MAX_MSG_LEN];
int create_queue = 0;
time_t currtime;
create_queue = 1;
msgprio = 5;
/* forcing specification of "-i" argument */
if (msgprio == 0) {
printf("Usage: %s [-q] -p msg_prio\n", argv[0]);
exit(1);
}
/* opening the queue -- mq_open() */
if (create_queue) {
/* mq_open() for creating a new queue (using default
attributes) */
//msgq_id = mq_open(MSGQOBJ_NAME, O_RDWR | O_CREAT |
O_EXCL, S_IRWXU | S_IRWXG, NULL);
int flags = O_RDWR | O_CREAT;
mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
struct mq_attr attr;
attr.mq_flags = 0;
attr.mq_maxmsg = 10;
attr.mq_msgsize = 20;
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting