On Sun, Jan 08, 2012 at 01:55:16PM +0000, jcup...@gmail.com wrote: > Date: Sun, 8 Jan 2012 13:55:16 +0000 > From: jcup...@gmail.com > Subject: Re: maybe known, maybe not... > To: Gary Kline <kl...@thought.org> > Cc: GTK Devel List <gtk-app-devel-list@gnome.org> > > Hi Gary, > > On 8 January 2012 02:49, Gary Kline <kl...@thought.org> wrote: > > o am trying to have a "run" button fork off a new gvim and increase > > a global counter after the first gvim is closed. my main gtk goes > > dark and nothing responds in this case. i don't know if every > > If you do this: > > system("gvim stuff.txt"); > > system() will block until the vim exits, and while system() is > blocked, your gtk application will not be handling events (like > repaint). > > A simple fix is to append a "&" so that the vim runs in the background: > > system("gvim stuff.txt &"); > > Now the system() will return immediately and your gtk program can > carry on working while the gvim runs.
i'll try it, thanks. i also have two "sleep(1);" in the code. i'm trying to slow the program down, if i remember correctly. i'm still too new to gtk, and so am almost coding blind. [[i do have what i want; but with the main application dark, i'm stuck!]] > > If you want something to stop the user launching 100s of gvims you > need to do a bit more work. hm. no, i wait for the .talk.N.txt.swp file to be unlinked before any new gvim can fork-exec. defensive work is ahead. gary > > John > -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.57a release of Jottings: http://jottings.thought.org Twenty-five years of service to the Unix community. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list