mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-12 19:22:41 +00:00
DtTerm/TermPrimUtil: Use mkstemp instead of mktemp
This commit is contained in:
parent
9dca44513c
commit
e2aa3e665b
1 changed files with 4 additions and 3 deletions
|
@ -412,8 +412,9 @@ _DtTermPrimStartLog(Widget w)
|
||||||
cp = XtMalloc(strlen(tw->term.logFile) + 1);
|
cp = XtMalloc(strlen(tw->term.logFile) + 1);
|
||||||
(void) strcpy(cp, tw->term.logFile);
|
(void) strcpy(cp, tw->term.logFile);
|
||||||
|
|
||||||
(void) mktemp(cp);
|
int logStream = mkstemp(cp);
|
||||||
if (cp && *cp) {
|
if (logStream != -1) {
|
||||||
|
tpd->logStream = fdopen(logStream, "w+");
|
||||||
tw->term.logFile = cp;
|
tw->term.logFile = cp;
|
||||||
} else {
|
} else {
|
||||||
(void) XtFree(cp);
|
(void) XtFree(cp);
|
||||||
|
@ -421,7 +422,7 @@ _DtTermPrimStartLog(Widget w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('|' == *tw->term.logFile ) {
|
else if ('|' == *tw->term.logFile ) {
|
||||||
/*
|
/*
|
||||||
** pipe logfile into command
|
** pipe logfile into command
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue