18 lines
573 B
Plaintext
18 lines
573 B
Plaintext
$OpenBSD: patch-ddd_exit_C,v 1.3 2002/10/13 21:45:46 naddy Exp $
|
|
--- ddd/exit.C.orig Tue Dec 19 08:45:49 2000
|
|
+++ ddd/exit.C Fri Oct 11 12:20:34 2002
|
|
@@ -1149,8 +1149,11 @@ void report_core(ostream& log)
|
|
if (!is_core_file("core"))
|
|
return;
|
|
|
|
- string tempfile = tmpnam(0);
|
|
- ofstream os(tempfile);
|
|
+ char temp_name[] = "/tmp/ddd.XXXXXXXXXX";
|
|
+ int temp_fd = mkstemp(temp_name);
|
|
+ string tempfile = temp_name;
|
|
+ close(temp_fd); // hack ...
|
|
+ ofstream os(temp_name); // ... no ofstream(fd) ctor
|
|
os <<
|
|
"set verbose off\n"
|
|
"set height 0\n"
|