chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d031c0
)
bootchart: bump RLIMIT_NOFILE only after we forked us off, so that the init system...
author
Lennart Poettering
<lennart@poettering.net>
Mon, 11 Mar 2013 21:54:36 +0000
(22:54 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 11 Mar 2013 21:54:36 +0000
(22:54 +0100)
src/bootchart/bootchart.c
patch
|
blob
|
history
diff --git
a/src/bootchart/bootchart.c
b/src/bootchart/bootchart.c
index a722b2aabf60957f7258070e38f379773f1f6079..e608af2e3fae3b6cda50d882e4e1479bab2fa6b9 100644
(file)
--- a/
src/bootchart/bootchart.c
+++ b/
src/bootchart/bootchart.c
@@
-90,8
+90,6
@@
double arg_scale_y = 20.0; /* 16px = 1 process bar */
char arg_init_path[PATH_MAX] = "/sbin/init";
char arg_output_path[PATH_MAX] = "/run/log";
char arg_init_path[PATH_MAX] = "/sbin/init";
char arg_output_path[PATH_MAX] = "/run/log";
-static struct rlimit rlim;
-
static void signal_handler(int sig) {
if (sig++)
sig--;
static void signal_handler(int sig) {
if (sig++)
sig--;
@@
-110,6
+108,7
@@
int main(int argc, char *argv[]) {
int gind;
int i, r;
char *init = NULL, *output = NULL;
int gind;
int i, r;
char *init = NULL, *output = NULL;
+ struct rlimit rlim;
const ConfigTableItem items[] = {
{ "Bootchart", "Samples", config_parse_int, 0, &arg_samples_len },
const ConfigTableItem items[] = {
{ "Bootchart", "Samples", config_parse_int, 0, &arg_samples_len },
@@
-125,10
+124,6
@@
int main(int argc, char *argv[]) {
{ NULL, NULL, NULL, 0, NULL }
};
{ NULL, NULL, NULL, 0, NULL }
};
- rlim.rlim_cur = 4096;
- rlim.rlim_max = 4096;
- (void) setrlimit(RLIMIT_NOFILE, &rlim);
-
fn = "/etc/systemd/bootchart.conf";
f = fopen(fn, "re");
if (f) {
fn = "/etc/systemd/bootchart.conf";
f = fopen(fn, "re");
if (f) {
@@
-260,6
+255,10
@@
int main(int argc, char *argv[]) {
}
argv[0][0] = '@';
}
argv[0][0] = '@';
+ rlim.rlim_cur = 4096;
+ rlim.rlim_max = 4096;
+ (void) setrlimit(RLIMIT_NOFILE, &rlim);
+
/* start with empty ps LL */
ps_first = calloc(1, sizeof(struct ps_struct));
if (!ps_first) {
/* start with empty ps LL */
ps_first = calloc(1, sizeof(struct ps_struct));
if (!ps_first) {