diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Makemodule.am | 4 | ||||
-rw-r--r-- | cmd/runsvc/env.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/cmd/Makemodule.am b/cmd/Makemodule.am index f2c7d5f..78692d1 100644 --- a/cmd/Makemodule.am +++ b/cmd/Makemodule.am @@ -8,7 +8,7 @@ runsvc_SOURCES = cmd/runsvc/runsvc.c cmd/runsvc/env.c cmd/runsvc/runsvc.h runsvc_CPPFLAGS = $(AM_CPPFLAGS) runsvc_CFLAGS = $(AM_CFLAGS) runsvc_LDFLAGS = $(AM_LDFLAGS) -runsvc_LDADD = libinit.a libutil.a libcfg.a +runsvc_LDADD = libinit.a libcfg.a libutil.a killall5_SOURCES = cmd/killall5.c killall5_CPPFLAGS = $(AM_CPPFLAGS) @@ -24,7 +24,7 @@ service_SOURCES += $(SRVHEADERS) service_CPPFLAGS = $(AM_CPPFLAGS) service_CFLAGS = $(AM_CFLAGS) service_LDFLAGS = $(AM_LDFLAGS) -service_LDADD = libinit.a libutil.a libcfg.a +service_LDADD = libinit.a libcfg.a libutil.a if GCROND service_SOURCES += cmd/service/schedule.c diff --git a/cmd/runsvc/env.c b/cmd/runsvc/env.c index 1e73ee4..e58d803 100644 --- a/cmd/runsvc/env.c +++ b/cmd/runsvc/env.c @@ -86,17 +86,12 @@ static struct entry *list_from_file(void) { struct entry *list; rdline_t rd; - int fd; - fd = open(ENVFILE, O_RDONLY); - if (fd < 0) { - perror(ENVFILE); + if (rdline_init(&rd, AT_FDCWD, ENVFILE, 0, NULL)) return NULL; - } - rdline_init(&rd, fd, ENVFILE, 0, NULL); list = parse_list(&rd); - close(fd); + rdline_cleanup(&rd); return list; } |