Re: Q: FILE* popen command shell calls
From: James Lehman (james[remove)
Date: Sun, 12 Dec 2004 14:08:14 -0500
What's the short answer to get the output of dd,
good or bad, into a string?
Thanks for being so quick with the response.
"Basile Starynkevitch [news]" <email@example.com> wrote in
> On 2004-12-12, James Lehman <> wrote:
> > Why do I get nothing in command_return from calling the dd command?
> > Is it because dd reports to stderr?
> > How do I read stderr from a popen(ed) FILE* ?
> Don't use popen, but use the basic system calls (fork, execve, dup,
> dup2, close...). Some libraries (eg libqt, or glib from gtk) offer
> more powerful interfaces for that.
> Basile STARYNKEVITCH http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net
> aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
> 8, rue de la Fa´encerie, 92340 Bourg La Reine, France