From 4f60d13820ad95d876f6daacefe4e72ffff57a5f Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 11 Jul 2019 17:06:31 +0300 Subject: New options to select the shell binary and to run the command directly * .gitmodules: New module: runcap * Makefile.am: Build runcap * configure.ac: Setup runcap * src/Makefile.am: Add runcap dependencies. * src/com_start.c (spawn): New function. (com_start): Use spawn. * src/sentinel.c (start_command): Use spawn. * src/genrc.8: Document new options: --shell, --exec, --verbose. * src/genrc.c (genrc_shell): New global. (longopts): New options: --shell (-s), --exec (-e). (main): Setup shortopts from longopts. * src/genrc.h (genrc_shell): New global. (spawn): New proto. * src/runas.c: Set HOME and USER environment variables. --- src/genrc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/genrc.h') diff --git a/src/genrc.h b/src/genrc.h index c6ee57b..e77c840 100644 --- a/src/genrc.h +++ b/src/genrc.h @@ -1,5 +1,5 @@ /* This file is part of genrc -Copyryght (C) 2018 Sergey Poznyakoff +Copyryght (C) 2018, 2019 Sergey Poznyakoff License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -145,6 +145,9 @@ extern int genrc_signal_stop; extern GENRC_PID_CLOSURE *genrc_pid_closure; extern char *genrc_create_pidfile; extern int genrc_verbose; +extern char *genrc_shell; + +void spawn(int *p); int sentinel(void); -- cgit v1.2.1