Dear all,

I'm trying to execute a system command using g_spawn_command_line_sync.
When the system command contains no pipes all is well. However, when the
command contains pipes, for example:

g_spawn_command_line_sync("xwininfo -tree -root | grep \"Mesh Viewer
\"",&standard_out,&standard_err,&exit_stat,&error);

everything falls to pieces and the command isn't interpreted properly
(the output I get on stderr is "usage:  xwininfo [-options ...]\n\nwhere
options include:\n    -help", ' ' <repeats 16 times>, "print this
message\n    -display host:dpy    X server to contact\n    -root", ' '
<repeats 16 times>, "use the root window\n    -id wi"..."

Can anyone help? Am I using g_spawn_command_line_sync the wrong way? Is
it not intended to work with pipes?

Thanks, Tim



_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to