summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/patch.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-12-11 12:24:21 +0000
committerpeter <peter@FreeBSD.org>1999-12-11 12:24:21 +0000
commit784ea5066cbea73d04e8ce5783dd0eb842e3ac1f (patch)
tree2a59869a343a5d43c01370f1083d67c2a02785a0 /contrib/cvs/src/patch.c
parent308b60f66831aa65a459a7b347ea6ca14b6e4799 (diff)
downloadFreeBSD-src-784ea5066cbea73d04e8ce5783dd0eb842e3ac1f.zip
FreeBSD-src-784ea5066cbea73d04e8ce5783dd0eb842e3ac1f.tar.gz
Import cvs-1.10.7. There are a number of nasty bugs that have been fixed.
Obtained from: cyclic.com
Diffstat (limited to 'contrib/cvs/src/patch.c')
-rw-r--r--contrib/cvs/src/patch.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/contrib/cvs/src/patch.c b/contrib/cvs/src/patch.c
index 9f56b62..f16a331 100644
--- a/contrib/cvs/src/patch.c
+++ b/contrib/cvs/src/patch.c
@@ -763,19 +763,29 @@ patch_dirproc (callerdat, dir, repos, update_dir, entries)
static RETSIGTYPE
patch_cleanup ()
{
+ /* Note that the checks for existence_error are because we are
+ called from a signal handler, without SIG_begincrsect, so
+ we don't know whether the files got created. */
+
if (tmpfile1 != NULL)
{
- (void) unlink_file (tmpfile1);
+ if (unlink_file (tmpfile1) < 0
+ && !existence_error (errno))
+ error (0, errno, "cannot remove %s", tmpfile1);
free (tmpfile1);
}
if (tmpfile2 != NULL)
{
- (void) unlink_file (tmpfile2);
+ if (unlink_file (tmpfile2) < 0
+ && !existence_error (errno))
+ error (0, errno, "cannot remove %s", tmpfile2);
free (tmpfile2);
}
if (tmpfile3 != NULL)
{
- (void) unlink_file (tmpfile3);
+ if (unlink_file (tmpfile3) < 0
+ && !existence_error (errno))
+ error (0, errno, "cannot remove %s", tmpfile3);
free (tmpfile3);
}
tmpfile1 = tmpfile2 = tmpfile3 = NULL;
OpenPOWER on IntegriCloud