[darcs-devel] Re: [issue160] darcs failed: resource vanished (on
sigPIPE)
David Roundy
droundy at darcs.net
Mon May 1 07:26:27 PDT 2006
Okay, I tracked this one down. Here's the patch (whose comment explains
how this came to pass).
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
New patches:
[fix error is is_pipe test in error reporting. (fixes Issue160)
David Roundy <droundy at darcs.net>**20060501142114
The trouble was that Ian (quite naturally) assumed that my C function
stdout_is_a_pipe returned nonzero for true, whereas for some very, very
backwards reason it returned zero for true, and its result was properly
interpreted. So I caused this bug by my (unexplained) backwards
programming, but it was introduced when Ian refactored the C code. :(
]
<
> {
hunk ./SignalHandler.lhs 58
exitWith $ ExitFailure $ 1
die_with_string e | take 6 e == "STDOUT" =
do is_pipe <- stdout_is_a_pipe
- - when is_pipe $
+ when (not is_pipe) $
hPutStrLn stderr $ "\ndarcs failed: "++drop 6 e
exitWith $ ExitFailure $ 2
die_with_string e = do hPutStrLn stderr $ "\ndarcs failed: "++e
hunk ./changelog.in/entries/droundy 12
# If other developers prefer, they could also create a new file for each
# change. I'm still working out how best to handle this new changelog
# scheme.
+
+match: name "fix error is is_pipe test.*fixes Issue160"
+
+> Fixed bug leading to a spurious "darcs failed: resource vanished" error
+> message when darcs output is piped to a program such as head that then
+> exits. (Issue160, David Roundy)
match: name "speed up replace by first checking on each line"
}
Context:
[TAG 1.0.7pre1
Tommy Pettersson <ptp at lysator.liu.se>**20060427095905]
Patch bundle hash:
8baaa65ed94963be2361cc1fc4b86a4bb2040845
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEVhoLQ6uZI9PVvOwRAl+cAKDQpDwCDtF6GFK36DvMqcr4MrgNHQCffcox
75ICVJW/CKVcbgecZHmGfE0=
=vBWp
-----END PGP SIGNATURE-----
More information about the darcs-devel
mailing list