1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-12 11:12:18 +00:00

DtTerm/TermPrimUtil: Use mkstemp instead of mktemp

This commit is contained in:
Patrick Georgi 2024-01-03 22:51:58 +01:00
parent 9dca44513c
commit e2aa3e665b

View file

@ -412,8 +412,9 @@ _DtTermPrimStartLog(Widget w)
cp = XtMalloc(strlen(tw->term.logFile) + 1);
(void) strcpy(cp, tw->term.logFile);
(void) mktemp(cp);
if (cp && *cp) {
int logStream = mkstemp(cp);
if (logStream != -1) {
tpd->logStream = fdopen(logStream, "w+");
tw->term.logFile = cp;
} else {
(void) XtFree(cp);
@ -421,7 +422,7 @@ _DtTermPrimStartLog(Widget w)
}
}
if ('|' == *tw->term.logFile ) {
else if ('|' == *tw->term.logFile ) {
/*
** pipe logfile into command
*/