mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-10-04 12:59:31 +00:00
Main: Call mlockall after fork
Man page of mlockall is clear:
Memory locks are not inherited by a child created via fork(2) and are
automatically removed (unlocked) during an execve(2) or when the
process terminates.
So calling mlockall before corosync_tty_detach is noop when corosync is
executed as a daemon (corosync -f was not affected).
This regression is caused by ed7d054e55
(setprio for logsys/qblog was correct, mlockall was not).
Solution is to move corosync_mlockall call on correct place.
Signed-off-by: Andrew Price <anprice@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
4ebb7ad07d
commit
86012ebb45
@ -1171,8 +1171,6 @@ int main (int argc, char **argv, char **envp)
|
||||
corosync_setscheduler ();
|
||||
}
|
||||
|
||||
corosync_mlockall ();
|
||||
|
||||
/*
|
||||
* Other signals are registered later via qb_loop_signal_add
|
||||
*/
|
||||
@ -1305,6 +1303,8 @@ int main (int argc, char **argv, char **envp)
|
||||
corosync_tty_detach ();
|
||||
}
|
||||
|
||||
corosync_mlockall ();
|
||||
|
||||
corosync_poll_handle = qb_loop_create ();
|
||||
|
||||
memset(&scheduler_pause_timeout_data, 0, sizeof(scheduler_pause_timeout_data));
|
||||
|
Loading…
Reference in New Issue
Block a user