Glib::spawn family and pipes



Hi,

Till recently i used system() or popen() to execute commands from within
my code, but when i read about the Glib::spawn family
( http://gtkmm.org/docs/glibmm-2.4/docs/reference/html/group__Spawn.html#g31678b7b0796693f2f6d1268ba50e4bd )
i decided to use them instead.

Works ok sofar, but now i'm encountering a problem with commands like
'echo y | command'. This is supposed to pipe 'y' into command but
instead it does echo 'y | command'. ( it prints 'y | command' ;) ).

I suppose i could fix this by using Glib::spawn_async_with_pipes but i'd
rather have something 'simple' (maybe bash-related).

Any insights?

plors






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