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
commitb38569ff99f04a0eff4c8387273fafe38bb58c43 (patch)
tree2ed56a5cb810a4c08d41ea1babfef0e4a2c88b3e /contrib/cvs/src/patch.c
parent25155fc40f43750917e9621b6e4b57f72e19a29c (diff)
parent784ea5066cbea73d04e8ce5783dd0eb842e3ac1f (diff)
downloadFreeBSD-src-b38569ff99f04a0eff4c8387273fafe38bb58c43.zip
FreeBSD-src-b38569ff99f04a0eff4c8387273fafe38bb58c43.tar.gz
This commit was generated by cvs2svn to compensate for changes in r54427,
which included commits to RCS files with non-trunk default branches.
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