|
Hi all, I am using DirectFB 0.9.25 and Linux Fusion 3.0 and gtk2.9 and kernel is greater than 2.6.0 and compiled for Multi application support . Iam able to launch any number of DFBTerm but system hangs while launching an GTK application Launching any gtkapplication using another gtk applications hangs in directfb
Procedure: I have an gtkapplication gtkfork.c which launches gtk-demo(Written in gtk) application . It is working fine in X11. When I run the gtkfork.c in directfb, gtkfork runs but while launching gtk-demo application the system hangs. I found that the process gtkfork is killed while launching the gtk-demo from the gtkfork.
Please let me know any way to solve this.
Regards, Dharma
The code for gtkfork.c is below and gtk-demo is a standard application
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <gtk/gtk.h>
gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) { return(FALSE); }
void destroy(GtkWidget *widget, gpointer data) { gtk_main_quit(); }
void fork_me(GtkWidget *widget, gpointer data) { pid_t pid;
pid = vfork();
if(pid == -1) { perror("fork"); exit(-1); } else if(pid == 0) { execl("/home/demo/vss/gtk-demo", "text",(char*)0); perror("execlp"); _exit(-1); } else { fprintf(stderr, "Parent: forked a child with pid = %d\n", (int)pid); }
}
int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *button;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show (window);
g_signal_connect(G_OBJECT (window), "delete_event", G_CALLBACK(delete_event), NULL);
g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK(destroy), NULL);
/* add a button to do something usefull */
button = gtk_button_new_with_label("Fork me!"); gtk_widget_show (button);
gtk_container_add(GTK_CONTAINER(window), button);
g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(fork_me), NULL);
/* main loop */ gtk_main (); }
|
_______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
