On Wed, Mar 14, 2012 at 10:18:12AM -0300, Luiz Capitulino wrote: > On Wed, 14 Mar 2012 15:14:10 +0200 > Alon Levy <al...@redhat.com> wrote: > > > On Wed, Mar 14, 2012 at 09:32:58AM -0300, Luiz Capitulino wrote: > > > On Wed, 14 Mar 2012 08:37:13 +0000 > > > "Daniel P. Berrange" <berra...@redhat.com> wrote: > > > > > > > > First, with this applied you will not know the size in advance. Also > > > > > one of the approaches discussed is to allow passing in a file handle. > > > > > That is a possible way to handle async screendumps too: just write to > > > > > the passed file handle and close it when done. Obvious drawback is > > > > > that > > > > > this will not cover the classic way of specifying the output filename > > > > > as > > > > > argument. > > > > > > As Daniel explains below, this is not a drawback and there's no problem > > > supporting multiple ways of returning the image. > > > > > > The real drawback of making this w/o async support is that you can't > > > detect > > > errors. > > > > > > > You also can't detect when the writing is done (unless you continuously > > try to parse the file yourself..) > > Oh, really? For some reason I had a pipe in my mind, but I honestly don't > what's the semantics of fd passing in that regard.
Like Daniel pointed out, I am dead wrong here, sorry for the noise.