[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-17 Thread Julien BLACHE
"Simon Matter" wrote: Hi, > Updated patch is attached, hope that's less confusing now. Applied, thanks. JB. -- Julien BLACHE GPG KeyID 0xF5D65169

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-15 Thread Simon Matter
>> "m. allan noah" wrote: >> >>> True enough, So, instead of using mktemp at all, why not do something >>> like append '.part' to the image name? I think that is a little more >>> clear to the end user if they find some hanging around after a >>> scanimage crash or something. >> >> Absolutely, esp

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-15 Thread Simon Matter
> "m. allan noah" wrote: > >> True enough, So, instead of using mktemp at all, why not do something >> like append '.part' to the image name? I think that is a little more >> clear to the end user if they find some hanging around after a >> scanimage crash or something. > > Absolutely, especially

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread Julien BLACHE
"m. allan noah" wrote: > True enough, So, instead of using mktemp at all, why not do something > like append '.part' to the image name? I think that is a little more > clear to the end user if they find some hanging around after a > scanimage crash or something. Absolutely, especially if this al

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread Julien BLACHE
"Simon Matter" wrote: > 3) from what I understand using mktemp() here is not less secure than what > scanimage does when writing output files anyway. Your previous mail implies that you're writing to /tmp, which is another story entirely... If you're not, that's acceptable. JB. -- Julien BLAC

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread Simon Matter
> "Simon Matter" wrote: > > Hi, > >> It creates a temp file using (unsecure) mktemp(3) and writes to it > >> Would be nice if that one could go into CVS. > > Regardless of anything else in the patch, you know what you have to do > if you want that to happen

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread Julien BLACHE
"Simon Matter" wrote: Hi, > It creates a temp file using (unsecure) mktemp(3) and writes to it > Would be nice if that one could go into CVS. Regardless of anything else in the patch, you know what you have to do if you want that to happen :-) JB. --

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread Simon Matter
Hi, While optimizing our scanmonitord setup for speed I realized an issue with scanimage in batch mode. We perform many postprocessing steps on scanned files with daemons called from scanmonitord (this version is not in CVS yet because it's our development version). They maintain different queues

[sane-devel] PATCH: Make creation of output files of scanimage batch mode atomic

2009-01-14 Thread m. allan noah
On Wed, Jan 14, 2009 at 3:06 PM, Julien BLACHE wrote: > "Simon Matter" wrote: > >> 3) from what I understand using mktemp() here is not less secure than what >> scanimage does when writing output files anyway. True enough, So, instead of using mktemp at all, why not do something like append '.pa