Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 14:22:16 +0200
From:      Gabriel Ambuehl <gabriel_ambuehl@buz.ch>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        David Leimbach <leimbacd@bellsouth.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re[2]: Passing data in C++ via stdin without waiting for the new process to  complete
Message-ID:  <155755329886.20010710142216@buz.ch>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?155755329886.20010710142216>