Re: Function to execute a program

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

 



Hi,

Pisanu Prasertnopakun wrote:
// HERE i find a function to run a simple program like xclock!!
// i should ! be "run(xclock);" or something like that.. have somebody an idea?

The easiest is system():


 if( system( "xterm &" ) )
   printf( "couldn't start xterm\n" );

It's *nix only. glib has g_spawn_*(), which will work on all platforms.

http://developer.gnome.org/doc/API/2.0/glib/glib-Spawning-Processes.html

John

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux