Sorry, the subject line can't say enough. Out of space.
Oh yeah, hello everyone. Forgot me manners.
I'm looking to call one exec from another (both mine) and want to 'ret' a(n) (possibly sizeable) amount of data. I'm also looking to Keep It Simple. Syscalls only, most likely, don't want to pull in too many deps.
One of my more promising ideas was to use one of my libs to expose a 'get/set/clear' function to handle the data transfer then tell the callee when to terminate. Kinda hack-ish, I know. Deps, yep, but they're my deps.
Still, I'm looking for a more convienient method. Lotsa good minds out there, surely someone's come across something like this before.
And I'm not gonna stop looking. Not a help vamp, fyi, i just gotta be missing something obvious.
Ears open, gimme a shout.
--edit small typo
Last edited by eilenbeb on 16 Oct 2017, 00:51; edited 1 time in total
Joined: 09 Oct 2009
I do similar parent/child interprocess communication using the socketpair syscall. When the parent forks you can remap stdin/stdout and crosswire them, or just use standalone socketpairs, etc. Between socketpair and dup2 you have some good options IMO. I suppose it all depends on how much control you have of your child program/exec environment as to how it needs to be put together.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum