diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | dtrace | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2009-02-16 Mark Wielaard <mjw@redhat.com> + + PR 9849 + * dtrace: Use mkstemp. + 2009-02-15 Stan Cox <scox@redhat.com> * tapsets.cxx (dwflpp::iterate_over_cu_labels): Handle missing DW_AT_low_pc @@ -14,6 +14,7 @@ import os,posix,sys from subprocess import * +from tempfile import mkstemp class provider: arglist = dict() @@ -136,7 +137,8 @@ if (build_header): providers = provider() providers.open(s_filename, filename) elif (build_source): - fn = "/tmp/" + os.path.basename(s_filename).replace(".d", ".c") + basename = os.path.basename(s_filename).replace(".d", ".c") + (d,fn) = mkstemp(suffix=".c",prefix=basename) f = open(fn,mode='w') f.write("static __dtrace () {}\n") f.close() |