mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 01:05:06 -05:00
Fix memlockall patch
This commit is contained in:
20
main.c
20
main.c
@@ -309,6 +309,14 @@ int main
|
|||||||
CAM_Initialise();
|
CAM_Initialise();
|
||||||
RTC_Initialise();
|
RTC_Initialise();
|
||||||
|
|
||||||
|
if (SchedPriority > 0) {
|
||||||
|
SYS_SetScheduler(SchedPriority);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LockAll == 1 ) {
|
||||||
|
SYS_MemLockAll(LockAll);
|
||||||
|
}
|
||||||
|
|
||||||
if (user)
|
if (user)
|
||||||
SYS_DropRoot(user);
|
SYS_DropRoot(user);
|
||||||
|
|
||||||
@@ -339,18 +347,6 @@ int main
|
|||||||
signal(SIGHUP, signal_cleanup);
|
signal(SIGHUP, signal_cleanup);
|
||||||
#endif /* WINNT */
|
#endif /* WINNT */
|
||||||
|
|
||||||
#if defined(HAVE_SCHED_SETSCHEDULER)
|
|
||||||
if (SchedPriority > 0) {
|
|
||||||
SYS_SetScheduler(SchedPriority);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_MLOCKALL)
|
|
||||||
if (LockAll == 1 ) {
|
|
||||||
SYS_MemLockAll(LockAll);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The program normally runs under control of the main loop in
|
/* The program normally runs under control of the main loop in
|
||||||
the scheduler. */
|
the scheduler. */
|
||||||
SCH_MainLoop();
|
SCH_MainLoop();
|
||||||
|
|||||||
@@ -41,6 +41,6 @@ extern void SYS_Linux_DropRoot(char *user);
|
|||||||
|
|
||||||
extern void SYS_Linux_MemLockAll(int LockAll);
|
extern void SYS_Linux_MemLockAll(int LockAll);
|
||||||
|
|
||||||
extern void SYS_linux_SetScheduler(int SchedPriority);
|
extern void SYS_Linux_SetScheduler(int SchedPriority);
|
||||||
|
|
||||||
#endif /* GOT_SYS_LINUX_H */
|
#endif /* GOT_SYS_LINUX_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user