fork in callbacks



Hi all!

Can I fork() inside a (GNOME) widget callback?, for example:

    void checkout_dialog_cb (GtkWidget *w, gint button_number, gpointer
data)
    {
      GtkWidget *dialog = GTK_WIDGET(data);
      g_return_if_fail(dialog != NULL);
      switch (button_number)
      {
          case 0 : // 'Ok' button
              switch (fork())
              {
                  ..............whatever()..................
              }
              break;
          case 1 : // 'Cancel' button
              gtk_widget_destroy(dialog);
              break;
      }
    }

This is a callback for a GnomeDialog widget.

Thanks



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]