Minor changes.

* src/tar.c (main): Ignore SIGPIPE.
* src/system.c (sys_child_open_for_compress)
(sys_child_open_for_uncompress): Reset SIGPIPE
in child to default.
* tests/remfiles01.at: Avoid race conditions.
* tests/remfiles02.at: Likewise.
This commit is contained in:
Sergey Poznyakoff
2009-10-14 17:55:15 +03:00
parent 87240ee7c4
commit 0c6c288b53
4 changed files with 22 additions and 10 deletions
+11 -2
View File
@@ -40,11 +40,20 @@ chmod 0 a
genfile --file b
mkdir c
tar -c -f a -z --remove-files b c
# Depending on when the SIGPIPE gets delivered, the invocation below
# may finish with either
# tar: a: Cannot write: Broken pipe
# or
# tar: Child returned status 2
tar -c -f a -z --remove-files b c 2>err
EC=$?
sed -n '/(child)/p' err >&2
rm err
find . | sort
exit $EC
],
[0],
[2],
[.
./a
./b
+6 -5
View File
@@ -39,11 +39,14 @@ mkdir a
genfile --file b
mkdir c
tar -c -f a -z --remove-files b c
tar -c -f a -z --remove-files b c 2>err
EC=$?
sed -n '/(child)/p' err >&2
rm err
find . | sort
exit $EC
],
[0],
[2],
[.
./a
./b
@@ -51,8 +54,6 @@ find . | sort
],
[tar (child): a: Cannot open: Is a directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
])
AT_CLEANUP