flat assembler
Message board for the users of flat assembler.

Index > Linux > Error Handling

Author
Thread Post new topic Reply to topic
aristeiaguy



Joined: 12 Apr 2008
Posts: 2
aristeiaguy 12 Apr 2008, 02:51
I was wondering if someone could help me with the error handling in FASM. I am going to write a program which launches FASM from within it, and I want errors to be handled by my program, so I don't want the errors thrown to the screen. I didn't see a thread on this, but if there is just point me in that direction. If not, please let me know what I would need to edit, or give me and idea so I can do this on my own. Thank you in advance.
Post 12 Apr 2008, 02:51
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 12 Apr 2008, 06:59
you need to "redirect STDOUT" to your process from child (FASM) process - try to look up some info on this.
Post 12 Apr 2008, 06:59
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
aristeiaguy



Joined: 12 Apr 2008
Posts: 2
aristeiaguy 12 Apr 2008, 14:45
Thanks for the quick reply! I'll look into it and update what I find a bit later.
Post 12 Apr 2008, 14:45
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 12 Apr 2008, 18:54
You need to redirect STDOUT, STDERR and maybe STDIN. I suggest that first experience the problem in C. Redirection is simple. Functions (system calls) fork(), pipe(), dup(), close(), execl() are your friends.
Note, after call to dup() you will need to close the original STDOUT, STDERR, STDIN. Not speaking about that if you use pipe you might want to close one of the both directions (read/write) in the parent process and the the other in the child process.
Post 12 Apr 2008, 18:54
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 13 Apr 2008, 02:20
WHATSNEW.TXT wrote:
version 1.67.23 (Sep 08, 2007)

[+] Added "static" keyword for the "public" directive in COFF format.

[-] Redirected error information into stderr.
Post 13 Apr 2008, 02:20
View user's profile Send private message 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


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.