]> git.pld-linux.org Git - packages/chrony.git/commitdiff
- fix "status" in initscript (don't wait for sleep to finish) master
authorMarcin Krol <hawk@tld-linux.org>
Sun, 28 Apr 2024 20:37:40 +0000 (22:37 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 28 Apr 2024 20:37:40 +0000 (22:37 +0200)
chrony.spec
chronyd.init

index 6e3fab5ecc9d1754ba0f80fcde08300f7cb50a61..1ada5cdf23833abdfc899fa3be5db5843ad201f5 100644 (file)
@@ -4,7 +4,7 @@ Summary:        An NTP client/server
 Summary(pl.UTF-8):     Klient/serwer NTP
 Name:          chrony
 Version:       4.5
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Daemons
 Source0:       http://download.tuxfamily.org/chrony/%{name}-%{version}.tar.gz
index e4ff6e5ec0e2c69825097c1e9e12f7b0b1d82f75..45d18ff46e6c09dd7b4c951c2db16ceee79d8ce9 100755 (executable)
@@ -40,13 +40,13 @@ $1
 EOF
         chronycpid=$!
 
-        # chronyc will hang if the daemon doesn't respond, kill it after 3 s
-               #'
+        # chronyc will hang if the daemon doesn't respond, kill it after 3s
         (sleep 3; kill $chronycpid) < /dev/null > /dev/null 2>&1 &
         killerpid=$!
 
         wait $chronycpid >/dev/null 2>&1
-        kill $killerpid >/dev/null 2>&1 || echo "chronyd not responding"
+        # kill also $killerpid children processes to avoid waiting for "sleep" to finish
+        kill $killerpid $(cat /proc/$killerpid/task/$killerpid/children) >/dev/null 2>&1 || echo "chronyd not responding"
     ) | grep -v '200 OK'
 }
 
This page took 0.14722 seconds and 4 git commands to generate.