30 lines
895 B
Plaintext
30 lines
895 B
Plaintext
$OpenBSD: patch-ddd_comm-manag_C,v 1.2 2002/03/21 05:28:21 fgsch Exp $
|
|
--- ddd/comm-manag.C.orig Tue Jan 16 09:51:37 2001
|
|
+++ ddd/comm-manag.C Wed Mar 13 04:38:32 2002
|
|
@@ -85,6 +85,7 @@ char comm_manager_rcsid[] =
|
|
|
|
#include <ctype.h>
|
|
#include <fstream.h>
|
|
+#include <unistd.h>
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
@@ -800,13 +801,15 @@ void init_session(const string& restart,
|
|
info = new InitSessionInfo;
|
|
info->restart = restart;
|
|
info->settings = settings;
|
|
- info->tempfile = tmpnam(0);
|
|
+ char temp_name[] = "/tmp/ddd.XXXXXXXXXX";
|
|
+ int temp_fd = mkstemp(temp_name);
|
|
+ info->tempfile = temp_name;
|
|
|
|
string file_commands = "set confirm off\n";
|
|
bool recording_defines = false;
|
|
|
|
{
|
|
- ofstream os(info->tempfile);
|
|
+ ofstream os(temp_fd);
|
|
while (init_commands != "")
|
|
{
|
|
string cmd = init_commands.before('\n');
|