Sponsored Content
Full Discussion: mq_open too many files
Top Forums UNIX for Advanced & Expert Users mq_open too many files Post 302072141 by Frank2004 on Friday 28th of April 2006 03:01:04 AM
Old 04-28-2006
mq_open too many files

On True64 UNIX, in a process, how many message queues can be open and how to increase it if the value has been out of the system limits. In our program, we want to create 1000 message queues,the mq_open returns the error message "too many open files".thanks
 

10 More Discussions You Might Find Interesting

1. Programming

mq_open Hanging

One of my program which uses posix message queues was hanging in mq_open() system call, and after some time, it threw an error "Interrupted system call". I couldnt even unlink that message queue using mq_unlink(), as I have to use mq_open() prior to mq_unlink(). I use SunOS 5.7 Generic_106541-22... (0 Replies)
Discussion started by: Deepa
0 Replies

2. HP-UX

error mq_open message queue

Hello, J work on a HP. I want to create message queue by using mq_open with this parameters: mq_open(p,O_CREAT|O_WRONLY|O_EXCL|0_NONBLOCK,0600,&queue_attr) with p char and the function returns the value -1 and errno equal 2. can you help me ? Thank. (3 Replies)
Discussion started by: AUBERT
3 Replies

3. Programming

mq_open error

Hi, Am creating a msgqueue using mq_open </code> main() { struct mq_attr attr; /* message queue attributes structure */ memset(&_attr,0,sizeof(struct mq_attr)); attr.mq_maxmsg= 10; attr.mq_msgsize= 20; msg.flag = HS_FWK_MSGQ_FLAGS;... (2 Replies)
Discussion started by: rvan
2 Replies

4. Shell Programming and Scripting

How to retrieve all the linked script files/ctl files/sql files?

Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux. Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies

5. Programming

creating a message queue using mq_open

Hi all, First of all thanks in advance for reading my post and for your heart for helping me. I am trying to create a message queue using mq_open(name,oflags,mode_t,attr) method. But that function call is returning with an error code EFAULT. By googling it I found that it happens when there is... (10 Replies)
Discussion started by: parusasi
10 Replies

6. Shell Programming and Scripting

How to extract data from indexed files (ISAM files) maintained in an unix server.

Hi, Could someone please assist on a quick way of How to extract data from indexed files (ISAM files) maintained in an UNIX(AIX) server.The file data needs to be extracted in flat text file or CSV or excel format . Usually we have programs in microfocus COBOL to extract data, but would like... (2 Replies)
Discussion started by: devina
2 Replies

7. UNIX for Dummies Questions & Answers

write a program in c in unix that display the files(includ sub-direc and files within) in a sorted

the sorting is based on name of file, file size modification time stamps o f file it should dislay the output in the following format "." and ".." enteries should be ignored please give some idea how to do it (1 Reply)
Discussion started by: pappu kumar jha
1 Replies

8. Programming

POSIX message queue mq_open directory

hello, I try to test the POSIX mq_open function on book unp like below: #include "unpipc.h" # include <mqueue.h> int main(int argc, char **argv) { int c, flags; mqd_t mqd; flags = O_RDWR | O_CREAT; while ((c = getopt(argc, argv, "e")) != -1) { ... (3 Replies)
Discussion started by: anpufeng
3 Replies

9. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

10. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
MQ_OPEN(3)						     Linux Programmer's Manual							MQ_OPEN(3)

NAME
mq_open - open a message queue SYNOPSIS
#include <fcntl.h> /* For O_* constants */ #include <sys/stat.h> /* For mode constants */ #include <mqueue.h> mqd_t mq_open(const char *name, int oflag); mqd_t mq_open(const char *name, int oflag, mode_t mode, struct mq_attr *attr); Link with -lrt. DESCRIPTION
mq_open() creates a new POSIX message queue or opens an existing queue. The queue is identified by name. For details of the construction of name, see mq_overview(7). The oflag argument specifies flags that control the operation of the call. (Definitions of the flags values can be obtained by including <fcntl.h>.) Exactly one of the following must be specified in oflag: O_RDONLY Open the queue to receive messages only. O_WRONLY Open the queue to send messages only. O_RDWR Open the queue to both send and receive messages. Zero or more of the following flags can additionally be ORed in oflag: O_NONBLOCK Open the queue in nonblocking mode. In circumstances where mq_receive(3) and mq_send(3) would normally block, these functions instead fail with the error EAGAIN. O_CREAT Create the message queue if it does not exist. The owner (user ID) of the message queue is set to the effective user ID of the calling process. The group ownership (group ID) is set to the effective group ID of the calling process. O_EXCL If O_CREAT was specified in oflag, and a queue with the given name already exists, then fail with the error EEXIST. If O_CREAT is specified in oflag, then two additional arguments must be supplied. The mode argument specifies the permissions to be placed on the new queue, as for open(2). (Symbolic definitions for the permissions bits can be obtained by including <sys/stat.h>.) The permis- sions settings are masked against the process umask. The attr argument specifies attributes for the queue. See mq_getattr(3) for details. If attr is NULL, then the queue is created with implementation-defined default attributes. RETURN VALUE
On success, mq_open() returns a message queue descriptor for use by other message queue functions. On error, mq_open() returns (mqd_t) -1, with errno set to indicate the error. ERRORS
EACCES The queue exists, but the caller does not have permission to open it in the specified mode. EACCES name contained more than one slash. EEXIST Both O_CREAT and O_EXCL were specified in oflag, but a queue with this name already exists. EINVAL O_CREAT was specified in oflag, and attr was not NULL, but attr->mq_maxmsg or attr->mq_msqsize was invalid. Both of these fields must be greater than zero. In a process that is unprivileged (does not have the CAP_SYS_RESOURCE capability), attr->mq_maxmsg must be less than or equal to the msg_max limit, and attr->mq_msgsize must be less than or equal to the msgsize_max limit. In addition, even in a privileged process, attr->mq_maxmsg cannot exceed the HARD_MAX limit. (See mq_overview(7) for details of these limits.) EMFILE The process already has the maximum number of files and message queues open. ENAMETOOLONG name was too long. ENFILE The system limit on the total number of open files and message queues has been reached. ENOENT The O_CREAT flag was not specified in oflag, and no queue with this name exists. ENOENT name was just "/" followed by no other characters. ENOMEM Insufficient memory. ENOSPC Insufficient space for the creation of a new message queue. This probably occurred because the queues_max limit was encountered; see mq_overview(7). CONFORMING TO
POSIX.1-2001. BUGS
In kernels before 2.6.14, the process umask was not applied to the permissions specified in mode. SEE ALSO
mq_close(3), mq_getattr(3), mq_notify(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2009-02-20 MQ_OPEN(3)
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy