Re: something like system function
Yes, glib have something like that, you could also read the output from stderr. http://library.gnome.org/devel/glib/stable/glib-Spawning-Processes.html On Fri, May 15, 2009 at 11:30 AM, Chandra Shekhar wrote: > Hi frederico, > I suggest you should read about system calls available in > C. Visit > http://publib.boulder.ibm.com/iseries/v5r2/ic2928/index.htm?info/apis/getcwd.htm > for getting current working directory (pwd). Also visit > http://www.softpanorama.org/Internals/unix_system_calls.shtml > > for the rest of calls. > > > Regards. > > Chandra Shekhar. > > > On Thu, May 14, 2009 at 9:17 PM, frederico schardong > wrote: >> >> Hi, >> >> I need something like function system of stdlib.h, but I need to get >> the output of the command... example: >> gchar *returned; >> >> returned = system("pwd"); >> >> and returned must be the folder of the program... >> >> Gtk, or glib have something like that? >> >> -- >> Abraço, >> Frederico Schardong, >> SOLIS - O lado livre da tecnologia >> www.solis.coop.br >> ___ >> gtk-list mailing list >> gtk-list@gnome.org >> http://mail.gnome.org/mailman/listinfo/gtk-list > > > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: something like system function
Hi frederico, I suggest you should read about system calls available in C. Visit http://publib.boulder.ibm.com/iseries/v5r2/ic2928/index.htm?info/apis/getcwd.htmfor getting current working directory (pwd). Also visit http://www.softpanorama.org/Internals/unix_system_calls.shtml for the rest of calls. Regards. Chandra Shekhar. On Thu, May 14, 2009 at 9:17 PM, frederico schardong wrote: > Hi, > > I need something like function system of stdlib.h, but I need to get > the output of the command... example: > gchar *returned; > > returned = system("pwd"); > > and returned must be the folder of the program... > > Gtk, or glib have something like that? > > -- > Abraço, > Frederico Schardong, > SOLIS - O lado livre da tecnologia > www.solis.coop.br > ___ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: something like system function
> I need something like function system of stdlib.h, but I need to get > the output of the command... popen()? or g_spawn_command_line_sync(). --tml ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: something like system function
--- On Thu, 5/14/09, frederico schardong wrote: > From: frederico schardong > Subject: something like system function > To: gtk-list@gnome.org > Date: Thursday, May 14, 2009, 8:47 AM > Hi, > > I need something like function system of stdlib.h, but I > need to get > the output of the command... example: > gchar *returned; > > returned = system("pwd"); > > and returned must be the folder of the program... > > Gtk, or glib have something like that? > > -- > Abraço, > Frederico Schardong, > SOLIS - O lado livre da tecnologia > www.solis.coop.br > ___ And why should it be done through gtk+/glib and not through standard "C" library ? Regards, Sergei. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
something like system function
Hi, I need something like function system of stdlib.h, but I need to get the output of the command... example: gchar *returned; returned = system("pwd"); and returned must be the folder of the program... Gtk, or glib have something like that? -- Abraço, Frederico Schardong, SOLIS - O lado livre da tecnologia www.solis.coop.br ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list