From owner-freebsd-questions Tue Jul 10 7: 8:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from beta.root-servers.ch (gamma.root-servers.ch [195.49.62.126]) by hub.freebsd.org (Postfix) with SMTP id D4FE237B401 for ; Tue, 10 Jul 2001 07:08:36 -0700 (PDT) (envelope-from gabriel_ambuehl@buz.ch) Received: (qmail 60648 invoked from network); 10 Jul 2001 12:21:54 -0000 Received: from unknown (HELO athlon550) (62.2.106.17) by 195.49.33.19 with SMTP; 10 Jul 2001 12:21:54 -0000 Date: Tue, 10 Jul 2001 14:22:16 +0200 From: Gabriel Ambuehl X-Mailer: The Bat! (v1.53bis) Educational Organization: BUZ Internet Services X-Priority: 3 (Normal) Message-ID: <155755329886.20010710142216@buz.ch> To: Giorgos Keramidas Cc: David Leimbach , freebsd-questions@FreeBSD.ORG Subject: Re[2]: Passing data in C++ via stdin without waiting for the new process to complete In-Reply-To: <20010708204055.C81559@hades.hell.gr> References: <114577608557.20010708130014@buz.ch> <3B484403.1BA9A21D@jak.nl> <84594262844.20010708173749@buz.ch> <20010708104356.B5630@mutt.home.net> <186598221416.20010708184347@buz.ch> <20010708204055.C81559@hades.hell.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hello Giorgos, Sunday, July 08, 2001, 7:40:55 PM, you wrote: > You can also use shared memory or some other way of 'sharing the > data' among processes, without having to pass it through stdin, > stdout. AFAIK, there's no real shared memory standard so far and I'd like to remain on the portable side since the app should at least work on most Unices (notably Linux) and perhaps even on NT... > If you use pipes and stdin/stdout as the basis of communicating > things among your programs, I'm afraid you can't do what you are > trying to do without losing some data. There is buffering in the > kernel of pipe data, but buffers are not infinite. Oh I don't plan to pass more than a few kb per call. To the best of my knowledge, the buffers should be able to sustain that. > Temporary files, Probably pretty slow. > SYSV shared memory, Might be an option. > could use to pass data among processes without having the receiver > wait for the sender to finish, or the sender wait for the receiver > to 'consume' the data before it exits. As said, I'm currently considering the use of TCP/IP which isn't the fastest solution either but surely very portable and has the BIG advantage that the jobs could even be distributed among different systems... Best regards, Gabriel -----BEGIN PGP SIGNATURE----- Version: PGP 6.5i iQEVAwUBO0rla8Za2WpymlDxAQFpowf/ZzzeICaLsVCqS/pyxTBRQLKf3lyBMYNI fuC1Fp644S2eK4q7eoPCWvrIDIzlGW/qZSSBpgtsJOqY9xw+z0VxFZ4qPQhRCSSw 3lKVb34D++P+rM0eX80LuKn12WqAubv4QeM+tdpvxvckUQhIvaM1ewnK4LcJyC+V EsnPeXqzDHgL9hjFT57QZo//WcqXYFADKb7G5RUDuorcsWUZi/qju4nQwitM56VC mWItGihwcB3I+Au22DUsr8h4snvh38/iEsRaOOqJycMflV8agLD3ObMHs6Zl0cag 3vH55dH8O78GmcmmR+JiwofpwqPOrmhKSgxcLuOqhrYBNA0GzOy66Q== =pZSw -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message