Solved

IPC limit?

Posted on 2004-08-02
9
364 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FILE closing 11 68
Way to improve it 16 59
How to configure Digital Ouput in Renesas RH850/FIL Micrcontroller ? 5 178
why "." vs "->" 23 115
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now