Bugzilla – Attachment 2342 Details for
Bug 2156
Fix oom_adj on Linux after sshd reload
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make oom_adj reset before re-execing sshd
oom_relinquish_on_hup.patch (text/plain), 1.15 KB, created by
Matthew Ife
on 2013-09-22 08:07:33 AEST
(
hide
)
Description:
Make oom_adj reset before re-execing sshd
Filename:
MIME Type:
Creator:
Matthew Ife
Created:
2013-09-22 08:07:33 AEST
Size:
1.15 KB
patch
obsolete
>diff -ur openssh/platform.c openssh-new/platform.c >--- openssh/platform.c 2013-03-12 00:31:05.000000000 +0000 >+++ openssh-new/platform.c 2013-09-21 21:20:38.585268205 +0100 >@@ -55,6 +55,14 @@ > } > > void >+platform_pre_restart(void) >+{ >+#ifdef LINUX_OOM_ADJUST >+ oom_adjust_restore(); >+#endif >+} >+ >+void > platform_post_fork_parent(pid_t child_pid) > { > #ifdef USE_SOLARIS_PROCESS_CONTRACTS >diff -ur openssh/platform.h openssh-new/platform.h >--- openssh/platform.h 2013-03-12 00:31:05.000000000 +0000 >+++ openssh-new/platform.h 2013-09-21 21:20:59.099481498 +0100 >@@ -22,6 +22,7 @@ > > void platform_pre_listen(void); > void platform_pre_fork(void); >+void platform_pre_restart(void); > void platform_post_fork_parent(pid_t child_pid); > void platform_post_fork_child(void); > int platform_privileged_uidswap(void); >diff -ur openssh/sshd.c openssh-new/sshd.c >--- openssh/sshd.c 2013-09-14 00:47:01.000000000 +0100 >+++ openssh-new/sshd.c 2013-09-21 21:21:26.719768708 +0100 >@@ -315,6 +315,7 @@ > sighup_restart(void) > { > logit("Received SIGHUP; restarting."); >+ platform_pre_restart(); > close_listen_socks(); > close_startup_pipes(); > alarm(0); /* alarm timer persists across exec */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2156
: 2342