Thank you for the fast and professional help. And thank you for the tips. I'm going to take a look at Glib::spawn_async and i should implement a while loop.
Greesce
2010/12/19 Gtk MailingList <gtkmailinglistgreesce googlemail com>:In this little program i try to replace all spaces in the string with "\ ".
Because if you use a space character in a path on the command line it
doesn't work. You must always use "/home/user/some\ directory/second\
directory" instead of "/home/user/some directory/second directory". Maybe
you have an better idea to solve this problem.
Use g_spawn_sync() / g_spawn_async() instead of system() to executethe command line program. The g_spawn family of functions takes a listof program arguments instead of a command line, so you don't need toescape any special characters.Regards, Krzysztof
|