Re: fork and gtk
- From: <xvw warande0147 warande uu nl>
- To: Matt Eisemann <meisemann dsrnet com>
- Cc: "'gtk-list gnome org'" <gtk-list gnome org>
- Subject: Re: fork and gtk
- Date: Tue, 3 Oct 2000 18:14:59 +0200 (CEST)
Perhaps __clone is an alternative. But I can't seem to grasp why one
would like to use fork() instead of threads for GUI apps. It seems
like you want to incorporate 2 different apps into 1.
Regards,
xander
On Tue, 3 Oct 2000, Matt Eisemann wrote:
> Date: Tue, 3 Oct 2000 11:49:44 -0400
> From: Matt Eisemann <meisemann dsrnet com>
> To: "'gtk-list gnome org'" <gtk-list gnome org>
> Subject: fork and gtk
>
> Currently I am hjaving a problem with using fork() and the following should
> explain better what example or what I am trying to do. If the fork()
> function is used in the function of main(), then 'fork()' is recognized but
> not if used in another function.
>
>
>
> With regard to the fork() command. The following is some source code
> but it may just be some compilation problem and not a gtk problem.
>
> #include <sys/types.h>
> #include <sys/wait.h>
>
> void quit(GtkButton *was_clicked, gpointer user_data)
> {
> pid_t pid;
> pid = fork();
> g_print("bye\n");
> gtk_main_quit();
> }
>
> if fork is used in this function, I get a warning that 'implicit
> declaration of fork() function' or something similar. However, if fork()
> is used in
> the main function ie
> int main(int argc, char *argv[])
> {
> pid_t pid;
> pid = fork();
>
>
>
> }
>
> seems to compile and work fine. Is this a gtk limitation that it needs to
> work in main. And I am not permanently putting fork() in my quit function,
> although I did try it and got the same warning so it seems like all
> functions are like this.
>
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]