Hello Ladies, Sir's;
I'm a hobbyst programmer, only 2 months in linux world, can code only in assembly and english is not my mother language, so, be patience, I'm trying to do my best to explain.
I have coded a simple window example using gtk, without using glade, from a tutorial that I have found on the net writed in C, translated it to asm and it worked. After, my next goal is to create the same program, but now, using glade to draw the window. So, I have coded it and it worked.
Generally; from the C point of view, you end your program with "return", and after that the program end.
The last line of code, "call exit" function to terminate the process. So, I have tried change that call to a "syscall sys_exit", but the program does not terminate, stay like a zoombie process, I think that the program expect some signal or something that I cannot know how to deal.
The question is:
How can I end the pseudo code below using syscall sys_exit (__NR 60) ?
Code:
.code
align 16
_start:
gtk_init,0,0
gtk_builder_new
mov builder,rax
gtk_builder_add_from_file,builder,offset tut,0
gtk_builder_get_object,builder,offset win
mov window,rax
gtk_builder_connect_signals,builder,0
gtk_widget_show,window
gtk_main
exit,0 ;<---- here is the point, this work fine, but if I use "sys_exit,0" does not work
end _start
the glade file used:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<glade-interface>
<!-- interface-requires gtk+ 2.24 -->
<!-- interface-naming-policy project-wide -->
<widget class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="events"></property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
</widget>
</glade-interface>
Thank you for your patience. If need I can post all the source, or more details. Thanks in advance.