DtTerm: Add libutempter support for utmp/wtmp updates.

This commit is contained in:
Liang Chang
2021-04-25 00:06:33 +08:00
committed by Jon Trulson
parent 3c4e5b3124
commit 8f52a65638
4 changed files with 31 additions and 3 deletions

View File

@@ -573,8 +573,10 @@ _DtTermPrimSubprocExec(Widget w,
}
/* set our utmp entry... */
#ifndef HAS_UTEMPTER_LIBRARY
(void) _DtTermPrimUtmpEntryCreate(w, getpid(),
((DtTermPrimitiveWidget)w)->term.tpd->utmpId);
#endif
if (isDebugSet('T')) {
#ifdef BBA
@@ -652,7 +654,9 @@ _DtTermPrimSubprocExec(Widget w,
/* assume that our child set up a utmp entry (since we have no way
* for it to report to us) and add it to the list to cleanup)...
*/
#ifndef HAS_UTEMPTER_LIBRARY
_DtTermPrimUtmpAddEntry(((DtTermPrimitiveWidget)w)->term.tpd->utmpId);
#endif
return(pid);
}