Solved

IPC limit?

Posted on 2004-08-02
9
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

691 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