File: 0005-sysdep-tmpfiles.patch

package info (click to toggle)
f2c 20160102-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,668 kB
  • sloc: ansic: 26,850; sh: 246; makefile: 12
file content (32 lines) | stat: -rw-r--r-- 974 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: "Barak A. Pearlmutter" <barak+git@cs.nuim.ie>
Date: Wed, 18 Jul 2012 11:15:58 +0200
Subject: sysdep tmpfiles

---
 src/sysdep.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/sysdep.c b/src/sysdep.c
index f6d418c..7d0ed55 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -96,7 +96,9 @@ Un_link_all(int cdelete)
 	if (!debugflag) {
 		unlink(c_functions);
 		unlink(initfname);
+                unlink(initbname);
 		unlink(p1_file);
+                unlink(p1_bakfile);
 		unlink(sortfname);
 		unlink(blkdfname);
 		if (cdelete && coutput)
@@ -235,6 +237,9 @@ set_tmp_names(Void)
 #endif /*NO_TEMPDIR*/
 		}
 	alloc_names();
+        /* What follows is safe if tmpdir is really
+        a private diectory created by us -- otherwise
+        the file could be a sym link somewhere else....*/
 	sprintf(c_functions, "%s/f2c%ld_func", tmpdir, pid);
 	sprintf(initfname, "%s/f2c%ld_rd", tmpdir, pid);
 	sprintf(blkdfname, "%s/f2c%ld_blkd", tmpdir, pid);