[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] quilt refresh leaks temporary files
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] quilt refresh leaks temporary files |
Date: |
Mon, 23 May 2005 11:14:30 +0200 (CEST) |
[Andreas Gruenbacher]
> Thanks for the fix! I suspect there are some more tempfile leaks left in
> addition, but they are not a severe problem.
I searched all the commands and helper scripts for temporary file leaks
and could find only one, in the mail command:
introduction=$(gen_tempfile)
(...)
$EDITOR $introduction || exit 1
However, I am wondering if the leak isn't there on purpose. Later in the
same script there is:
if [ ${PIPESTATUS[1]} -ne 0 ]; then
echo "Introductory message saved as $introduction" >&2
rm -f $body
exit 1
fi
Obviously the idea is to preserve what the user possibly typed as an
introduction for the mail. I don't know if the same applies to the
first case as well, it all depends on the reason why the $EDITOR command
failed. If it failed because the editor wasn't found, then there's not
much to preserve and we could remove the temporary file. But if it
failed for a different reason, and edition may already have begun, then
I guess we want to preserve the temporary file? Anyone has an example of
how an editor may fail? I can't think of any myself, but that would
depend of the editor I guess. Manual pages for vi, emacs, nedit and
gedit were clueless.
At any rate, we should not leave a temporary file behind us and not tell
the user about it, so if we decide to keep the leak in, it should be
clearly advertised as such, much like in the second quote above.
Thanks,
--
Jean Delvare