commit d35c0b0ad088d7b47a568350e822ec4f679802e6
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Oct 8 18:12:48 2015 +0300

    daemon: makepid implies fork

 lib/functions | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/functions b/lib/functions
index ca08dbe..8d018f7 100644
--- a/lib/functions
+++ b/lib/functions
@@ -690,6 +690,7 @@ _daemon_exec() {
                        --exec "$prog" \
                        -- "$@"
        else
+
                if [ "$makepid" ] && [ "$pidfile" ]; then
                        export PIDFILE="$pidfile"
                        set -- /lib/rc-scripts/makepid "$@"
@@ -708,7 +709,7 @@ _daemon_exec() {
 
 # A function to start a program (now it's useful on read-only filesystem too)
 daemon() {
-       local errors="" end="" waitname="" waittime=""
+       local errors="" waitname="" waittime=""
        local exit_code=0
        local nice=$SERVICE_RUN_NICE_LEVEL
        local fork user closefds redirfds pidfile makepid chdir=/
@@ -730,7 +731,6 @@ daemon() {
                        ;;
                --fork)
                        fork=1
-                       end='&'
                        ;;
                --chdir)
                        shift
@@ -761,6 +761,8 @@ daemon() {
                        ;;
                --makepid)
                        makepid=1
+                       # makepid implies fork
+                       fork=1
                        ;;
                -*|+*)
                        nice=$1
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/rc-scripts.git/commitdiff/1a0c02d0983a76562fa875a1bab45ece246b26a6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to