[Camps-users] refresh-camp --files and process_copy_paths

Jon Jensen jon at endpoint.com
Thu Sep 17 23:03:08 UTC 2009

On Thu, 17 Sep 2009, David Christensen wrote:

> I tracked down some bad behavior on the part of process_copy_paths() 
> when used non-interactively (filled up the root partition on a disk due 
> to an infinite loop when STDIN was null).  This prompted me to review 
> things for an appropriate fix.  The following is the patch that I came 
> up with.  It introduces an optional parameter to refresh-camp --files 
> which can take several values: copy, symlink, ask, default.  The commit 
> message goes into detail about what each option does, but it's pretty 
> straightforward.
> I'd appreciate a review of the ideas and the code itself before I push 
> it to the general repository.

David, it looks like a nice enhancement to me.

It doesn't actually seem to stop the infinite loop problem, though, in the 
case a non-tty process calls with --files=ask, does it? I really think the 
process should abort if the read from STDIN results in undef, since that 
can only mean EOF given manually or no tty, in which case aborting makes 
sense. (Even hitting <enter> won't return undef.)

What do you think?


Jon Jensen
End Point Corporation

More information about the Camps-users mailing list