Make dtlogin compile on OpenBSD.
Most importantly, we *cannot* do the utmp stuff this code is attempting. It is SysV-specific.
This commit is contained in:
committed by
Jon Trulson
parent
a8d5c1f0ba
commit
7c3a972d32
@@ -515,7 +515,7 @@ StopAll( int arg )
|
||||
|
||||
int ChildReady = 0;
|
||||
|
||||
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__uxp__) || defined (__osf__) || defined(linux)
|
||||
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__uxp__) || defined (__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
static SIGVAL
|
||||
ChildNotify( int arg )
|
||||
{
|
||||
@@ -599,7 +599,9 @@ ProcessChildDeath( int pid, waitType status )
|
||||
* do process accounting...
|
||||
*/
|
||||
|
||||
#if !defined(CSRG_BASED)
|
||||
Account(d, NULL, NULL, pid, DEAD_PROCESS, status);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -732,7 +734,9 @@ ProcessChildDeath( int pid, waitType status )
|
||||
* do process accounting...
|
||||
*/
|
||||
|
||||
#if !defined(CSRG_BASED)
|
||||
Account(d, NULL, NULL, pid, DEAD_PROCESS, status);
|
||||
#endif
|
||||
|
||||
switch (d->status)
|
||||
{
|
||||
@@ -1030,6 +1034,7 @@ StartDisplay(
|
||||
* are already in use...
|
||||
*/
|
||||
|
||||
#if !defined(CSRG_BASED)
|
||||
if (d->utmpId == NULL) {
|
||||
int i;
|
||||
char *p, *q;
|
||||
@@ -1061,6 +1066,7 @@ StartDisplay(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (NULL == d->authFile)
|
||||
@@ -1150,7 +1156,9 @@ StartDisplay(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if !defined(CSRG_BASED)
|
||||
Account(d, "LOGIN", line, getpid(), LOGIN_PROCESS, status);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!WaitForServer (d))
|
||||
@@ -1244,7 +1252,9 @@ StopDisplay( struct display *d )
|
||||
else
|
||||
if ((d->displayType.location == Local) || !dt_shutdown ) {
|
||||
/* don't remove the console */
|
||||
#if !defined(CSRG_BASED)
|
||||
Account(d, NULL, NULL, 0, DEAD_PROCESS, status);
|
||||
#endif
|
||||
RemoveDisplay (d);
|
||||
}
|
||||
}
|
||||
@@ -1546,7 +1556,9 @@ StartGetty( struct display *d )
|
||||
/*
|
||||
* do process accounting...
|
||||
*/
|
||||
#if !defined(CSRG_BASED)
|
||||
Account(d, "LOGIN", NULL, getpid(), LOGIN_PROCESS, status);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _AIX
|
||||
@@ -1723,6 +1735,7 @@ GettyRunning( struct display *d )
|
||||
|
||||
Debug("Checking for a getty on line %s.\n", utmp.ut_line);
|
||||
|
||||
#if !defined(CSRG_BASED)
|
||||
setutent();
|
||||
|
||||
rvalue = FALSE;
|
||||
@@ -1760,6 +1773,7 @@ GettyRunning( struct display *d )
|
||||
}
|
||||
|
||||
endutent();
|
||||
#endif /* !CSRG_BASED */
|
||||
return rvalue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user