Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 5473] creating md5sum log freezes with named pipe

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT metalab.unc.edu
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 5473] creating md5sum log freezes with named pipe
  • Date: Wed, 28 Jan 2004 10:43:11 -0500

http://bugs.sourcemage.org/show_bug.cgi?id=5473





------- Additional Comments From otom7630 AT lucy.troja.mff.cuni.cz 2004-01-28
10:43 -------
I just did a quick investigation of this, and if I understood it correctly, I
may have a solution inside sorcery which should not be much slower than
current
version (without pipe checking).

My understanding:
MD5 sum is created in libsorcery in function archive(), via this line:
while read LINE ; do md5sum "$LINE"; done < $INST_LOG 2>/dev/null >> $MD5_LOG

If this is correct, then possible solution is to add check for pipe before MD5
computation, like this:
---------------------------------------------------
while read LINE; do
if [ -p "$LINE" ]; then
md5sum "$LINE"
fi
done < $INST_LOG 2>/dev/null >> $MD5_LOG
---------------------------------------------------
This shouldn't be noticeably slower, as it gets inode entry for the file in
the
test, and under most circumstances this inode entry would remain in system
cache
until md5sum call, so it wouldn't require another directory search. And mere
start of md5sum binary is so slow that one or two inode searches doesn't
matter
at all. Anyway, this is done during installing the file, so small slowdown
shouldn't matter at all.
Only drawback of this is that pipes won't be in $MD5_LOG at all, but is it
really a drawback? I guess not, as it won't need more logic to md5check
function
for cast -n/-f.

Am I correct or is it complete nonsense? ;-)

Andy



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page