Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54283
b: refs/heads/master
c: 1d94cda
h: refs/heads/master
i:
  54281: 7deb91e
  54279: ba90aad
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 7, 2007
1 parent c4dd396 commit d2195e2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48b201846901c1780fbc7ea779dcc8aa8ab8e16b
refs/heads/master: 1d94cda04eb82feb87c932ac3d4aef1e9dc78a43
25 changes: 25 additions & 0 deletions trunk/arch/um/os-Linux/start_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <asm/unistd.h>
#include <asm/page.h>
#include <sys/types.h>
Expand Down Expand Up @@ -329,8 +330,32 @@ static void __init check_ptrace(void)

extern void check_tmpexec(void);

static void check_coredump_limit(void)
{
struct rlimit lim;
int err = getrlimit(RLIMIT_CORE, &lim);

if(err){
perror("Getting core dump limit");
return;
}

printf("Core dump limits :\n\tsoft - ");
if(lim.rlim_cur == RLIM_INFINITY)
printf("NONE\n");
else printf("%lu\n", lim.rlim_cur);

printf("\thard - ");
if(lim.rlim_max == RLIM_INFINITY)
printf("NONE\n");
else printf("%lu\n", lim.rlim_max);
}

void os_early_checks(void)
{
/* Print out the core dump limits early */
check_coredump_limit();

check_ptrace();

/* Need to check this early because mmapping happens before the
Expand Down

0 comments on commit d2195e2

Please sign in to comment.