Skip to content

Commit

Permalink
Merge pull request #118 from tylarb/set_limit_typo
Browse files Browse the repository at this point in the history
Fix typo in set_limits
  • Loading branch information
rhatdan authored Sep 11, 2019
2 parents 16f39b1 + 4a99067 commit 74fb3dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4873,13 +4873,13 @@ set_limits ()
struct rlimit l;

if (getrlimit (RLIMIT_NOFILE, &l) < 0)
error (EXIT_FAILURE, errno, "cannot read process rlimit");
error (EXIT_FAILURE, errno, "cannot read nofile rlimit");

/* Set the soft limit to the hard limit. */
l.rlim_cur = l.rlim_max;

if (setrlimit (RLIMIT_NOFILE, &l) < 0)
error (EXIT_FAILURE, errno, "cannot set process rlimit");
error (EXIT_FAILURE, errno, "cannot set nofile rlimit");
}

int
Expand Down

0 comments on commit 74fb3dd

Please sign in to comment.