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

Obvious bug in lh_clean



I've got version 1.0~a37-2 of live-helper on my machine (the latest
from sid) and lh_clean doesn't deal with incorrect arguments properly
- it calls itself with the --usage flag if it doesn't understand an
argument.  There is no '--usage' case in the switch tree.  The
attached patch fixes this, using text from the man page for lh_clean.

Rather than call the script and invoke another copy of the shell, it
might be preferrable to have a "usage" subroutine that is called by
the '--help' or '--usage' flags and also in case of a bad argument.
This would prevent the infinite-loop behavior I saw - even if the sub
were to become undefined it would simply fall through rather than
start a bunch of new processes (nearly a thousand by the time I
figured out what was going on).  I didn't implement this in my patch
in case there's some subtlety I'm missing.

Thanks!
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lh_clean.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20071128/ef19b6f2/attachment.bin 


Reply to: