Solved

IPC limit?

Posted on 2004-08-02
9
373 Views
Last Modified: 2006-11-17
Is there a way to get past the 4096 char limit set for interprocess communication. I know that limits.h set PIPE_BUF to 4096 and I try to redefine it in my program but that doesnt seem to work.

Can someone tell me the work around?
0
Comment
Question by:joele23
9 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11700596
What are you trying to do?

You can always create a buffering thread which will continuously monitor the pipe and store any available data in a buffer created by your program.

else you can try ulimit command with -p option to set the pipe buffer size ... man ulimit for more information
0
 
LVL 22

Expert Comment

by:grg99
ID: 11703195
I've played with pipes; many many frustrations due to the poorly-defined semantics.
I've spent days trying to get simple things to work, with lots of buggy behaviors.

I strongly suggest you switch over to a TCP/IP connection, it's far more straightforward, portable to other OS's, fast, reliable, documented... etc.. etc.. etc...

0
 
LVL 2

Author Comment

by:joele23
ID: 11705764
Well basically I have a program that calls a certain number of plugins (other programs) and needs to be able to get the output(stdout,stderr) from the plugins. Recently I noticed that when there was a large amount of data returned I was being cut off at 4096 chars.

I am currently using fork and pipe  where I have the child execv the prog and the parent read in at the other end of the pipe unitl it gets the EOF. Which is fine unless theres more than 4096 chars.

 
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 45

Expert Comment

by:sunnycoder
ID: 11705843
did ulimit help ?
0
 
LVL 2

Author Comment

by:joele23
ID: 11706061
I did

      Warning:  This  routine is obsolete. The include file is no longer pro-
       vided by glibc.  Use getrlimit(2), setrlimit(2) and sysconf(3) instead.
       For the shell command ulimit, see bash(1).

I checked the other calls out and could not see a way to change the pipe buf size.
As I keep looking, the only way I have actually found to do it is by recompiling the kernel with the limits changed but that really doesnt help since thats not an option.

I guess my other option would be to make all the plugins dynamically linked modules, which means a lot more work on progs already written. Any other options?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11706134
ulimit -p from shell was what I meant ... check man bash
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12902867
PAQed with points refunded (75)

modulo
Community Support Moderator
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Read file descriptor 3 in C 14 107
C Language combined operators 28 109
Constant string is of type char *   ? 7 30
macro vba to pivot table 1 19
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question