diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-01-07 17:40:47 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-01-07 18:06:19 +0200 |
commit | e92cf71a8f4d51810de7c0f7a613402737d66168 (patch) | |
tree | 775bba0b6bfb026fc458e4c681744fb7661f349e /src/progman.c | |
parent | 5d2eff82abf052d5edb8f201559cb6e17bbf158f (diff) | |
download | pies-e92cf71a8f4d51810de7c0f7a613402737d66168.tar.gz pies-e92cf71a8f4d51810de7c0f7a613402737d66168.tar.bz2 |
Add function for parsing /etc/inittab.
* src/limits.c (free_limits): New function.
* src/pies.c (config_syntax): Move to pies.h
(config_syntax_tab): New type "inittab"
(free_action,component_free): New functions.
(component_finish): Call component_free to discard the
failed component.
(main): In sysvinit mode, default to reading two configuration files:
/etc/inittab and /etc/pies.init.
Don't exit on configuration errors in this mode.
* src/pies.h (str_to_config_syntax)
(add_config,free_redirector)
(component_free,free_limits)
(inittab_parse): New protos.
* src/progman.c (free_redirector): New function.
* src/sysvinit.c (inittab_parse): New function.
Diffstat (limited to 'src/progman.c')
-rw-r--r-- | src/progman.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/progman.c b/src/progman.c index 0463366..c9741d5 100644 --- a/src/progman.c +++ b/src/progman.c @@ -410,6 +410,13 @@ close_fds (fd_set *fdset) } } +void +free_redirector (struct redirector *rp) +{ + if (rp->type == redir_file) + free (rp->v.file); +} + int open_redirector (struct prog *master, int stream) { |