mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 16:45:40 -04:00
Change some limits, and fix timeout to not orphan things
This commit is contained in:
parent
c7b44290c3
commit
c4d914c308
3 changed files with 12 additions and 6 deletions
|
@ -75,7 +75,9 @@ sub timeout {
|
||||||
|
|
||||||
warn "Trying to kill: ", $wheel->PID;
|
warn "Trying to kill: ", $wheel->PID;
|
||||||
|
|
||||||
kill( 9, $wheel->PID );
|
kill( 'TERM', $wheel->PID ); # Try to avoid orphaning any sub processes first
|
||||||
|
sleep(3);
|
||||||
|
kill( 'KILL', $wheel->PID );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _append_output {
|
sub _append_output {
|
||||||
|
|
|
@ -39,6 +39,7 @@ our %rule_sets = (
|
||||||
{syscall => 'exit_group'},
|
{syscall => 'exit_group'},
|
||||||
{syscall => 'rt_sigaction'},
|
{syscall => 'rt_sigaction'},
|
||||||
{syscall => 'rt_sigprocmask'},
|
{syscall => 'rt_sigprocmask'},
|
||||||
|
{syscall => 'rt_sigreturn'},
|
||||||
|
|
||||||
{syscall => 'getuid'},
|
{syscall => 'getuid'},
|
||||||
{syscall => 'geteuid'},
|
{syscall => 'geteuid'},
|
||||||
|
@ -165,6 +166,9 @@ our %rule_sets = (
|
||||||
# Thread IPC writes, these might not be fixed but I don't know how to detect them otherwise
|
# Thread IPC writes, these might not be fixed but I don't know how to detect them otherwise
|
||||||
{syscall => 'write', rules => [[0, '==', 5]]},
|
{syscall => 'write', rules => [[0, '==', 5]]},
|
||||||
{syscall => 'write', rules => [[0, '==', 7]]},
|
{syscall => 'write', rules => [[0, '==', 7]]},
|
||||||
|
# TODO these should be defaults? locked down more?
|
||||||
|
{syscall => 'prctl',},
|
||||||
|
{syscall => 'poll',},
|
||||||
],
|
],
|
||||||
include => ['default', 'ruby_timer_thread'],
|
include => ['default', 'ruby_timer_thread'],
|
||||||
},
|
},
|
||||||
|
|
10
lib/eval.pl
10
lib/eval.pl
|
@ -262,15 +262,15 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_STACK, $limit, $limit )
|
setrlimit(RLIMIT_STACK, $limit, $limit )
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_NPROC, 4,4) # CHANGED to 3 for Ruby. Might take it away.
|
setrlimit(RLIMIT_NPROC, 10,10) # CHANGED to 3 for Ruby. Might take it away.
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_NOFILE, 20,20)
|
setrlimit(RLIMIT_NOFILE, 30,30)
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_OFILE, 20,20)
|
setrlimit(RLIMIT_OFILE, 30,30)
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_OPEN_MAX,20,20)
|
setrlimit(RLIMIT_OPEN_MAX,30,30)
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_LOCKS, 0,0)
|
setrlimit(RLIMIT_LOCKS, 5,5)
|
||||||
and
|
and
|
||||||
setrlimit(RLIMIT_AS,$limit,$limit)
|
setrlimit(RLIMIT_AS,$limit,$limit)
|
||||||
and
|
and
|
||||||
|
|
Loading…
Add table
Reference in a new issue