Re: maybe known, maybe not...

Hi Gary,

On 8 January 2012 02:49, Gary Kline <kline 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

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.

If you want something to stop the user launching 100s of gvims you
need to do a bit more work.


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