flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Linux > [solved] Returning data from a called executable

Author
Thread Post new topic Reply to topic
eilenbeb



Joined: 17 Feb 2010
Posts: 21
[solved] Returning data from a called executable
-- edit SOLVED... subject line out of chars.

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.
laters,
b

--edit small typo


Last edited by eilenbeb on 16 Oct 2017, 00:51; edited 1 time in total
Post 15 Oct 2017, 04:36
View user's profile Send private message Reply with quote
redsock



Joined: 09 Oct 2009
Posts: 265
Location: Australia
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.

$0.02 thusly Smile

_________________
2 Ton Digital - https://2ton.com.au/
Post 15 Oct 2017, 21:49
View user's profile Send private message Reply with quote
eilenbeb



Joined: 17 Feb 2010
Posts: 21
Interesting. Thanks, redsock that might be just what I'm after
Post 16 Oct 2017, 00:41
View user's profile Send private message Reply with quote
eilenbeb



Joined: 17 Feb 2010
Posts: 21
I cannot mark this as solved. Perhaps a forum moderator could do so for me?
Post 16 Oct 2017, 00:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15242
Location: 1I/╩╗Oumuamua
eilenbeb: I just removed the last part of the title "looking for options" and prepended "[solved]". If this is not to your liking you can always edit the title to something else.
Post 16 Oct 2017, 02:18
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.