os: move AbortServer() to os/utils.c
This function doesn't much to do with logging, except for being called once by FatalError(). It's better placed in utils.c Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1678>
This commit is contained in:
parent
579eb31222
commit
8e8bf63908
20
os/log.c
20
os/log.c
|
@ -744,26 +744,6 @@ LogHdrMessageVerb(MessageType type, int verb, const char *msg_format,
|
|||
va_end(hdr_args);
|
||||
}
|
||||
|
||||
void
|
||||
AbortServer(void)
|
||||
_X_NORETURN;
|
||||
|
||||
void
|
||||
AbortServer(void)
|
||||
{
|
||||
#ifdef XF86BIGFONT
|
||||
XF86BigfontCleanup();
|
||||
#endif
|
||||
CloseWellKnownConnections();
|
||||
OsCleanup(TRUE);
|
||||
AbortDevices();
|
||||
ddxGiveUp(EXIT_ERR_ABORT);
|
||||
fflush(stderr);
|
||||
if (CoreDump)
|
||||
OsAbort();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#define AUDIT_PREFIX "AUDIT: %s: %ld: "
|
||||
#ifndef AUDIT_TIMEOUT
|
||||
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
|
||||
|
|
|
@ -189,6 +189,7 @@ void OsBlockSignals(void);
|
|||
void OsReleaseSignals(void);
|
||||
void OsResetSignals(void);
|
||||
void OsAbort(void) _X_NORETURN;
|
||||
void AbortServer(void) _X_NORETURN;
|
||||
|
||||
void MakeClientGrabPervious(ClientPtr client);
|
||||
void MakeClientGrabImpervious(ClientPtr client);
|
||||
|
|
16
os/utils.c
16
os/utils.c
|
@ -1542,3 +1542,19 @@ os_move_fd(int fd)
|
|||
return newfd;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
AbortServer(void)
|
||||
{
|
||||
#ifdef XF86BIGFONT
|
||||
XF86BigfontCleanup();
|
||||
#endif
|
||||
CloseWellKnownConnections();
|
||||
OsCleanup(TRUE);
|
||||
AbortDevices();
|
||||
ddxGiveUp(EXIT_ERR_ABORT);
|
||||
fflush(stderr);
|
||||
if (CoreDump)
|
||||
OsAbort();
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue