]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Merge branch 'refs/heads/t/kill-w'
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 18 Nov 2017 14:54:03 +0000 (15:54 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 18 Nov 2017 14:56:55 +0000 (15:56 +0100)
Two patches which make life easier for shutdown scripts which need
to terminate the dss process, but would like to wait until the exit
hook completed.

The merge conflicted in dss.suite, but this was trivial to fix.

Cooking for a week.

* refs/heads/t/kill-w:
  kill: New option --wait.
  run: Wait for children to die.

1  2 
NEWS
dss.c
dss.suite
err.h

diff --cc NEWS
index 09e72093165b72ab94d0484211ad3292895316b5,755cad21834cc7b6d150746e6555544d706802c6..0f9b6d27b860cef44cd4b3c68de75154a2c58da7
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,24 -1,17 +1,30 @@@
  -----------------------
 -x.y.z (to be announced)
 +1.0.0 (to be announced)
  -----------------------
  
 - - Improved error diagnostics for the kill subcommand.
 + - The gengetopt option parser has been replaced by the
 + [lopsub](http://people.tuebingen.mpg.de/maan/lopsub) library. Hence
 + lopsub must be installed to compile this package. help2man is
 + no longer required since lopsub has built-in roff support.
 +
 + - New subcommand "configtest" to check the command line options and
 + the configuration file for syntactic correctness.
 +
 + - New option: --mountpoint. If this option is given, dss aborts if
 + no file system is mounted on the destination directory.
 +
 + - New option --checksum to let rsync compute checksums occasionally.
 +
++ - The kill subcommand gained the new --wait option which instructs dss
++ to wait until the signalled process has terminated.
   - The --no-resume option has been removed.
  
 - - The gengetopt option parser has been replaced by the
 - [lopsub](http://people.tuebingen.mpg.de/~maan/lopsub) library. Hence
 - lopsub must be installed to compile this package. Also help2man is
 - no longer required since lopsub has built-in roff support.
++ - On exit, the run subcommand now waits for any previously spawned
++ rsync or rm processes to terminate.
 - - "make install" will install the executable and the man page.
 + - The ls subcommand now shows the age of incomplete snapshots rather
 + than 0:00.
  
   - In run mode, dss no longer exits successfully if another instance
   is already running.
diff --cc dss.c
Simple merge
diff --cc dss.suite
index 1e798702676106238c180879889957d7913c2056,d4926c3117ab214461d44b359beb02e77bfcd9f5..f02c825223d55aaf7275a567ef93a352a7523bf5
+++ b/dss.suite
@@@ -487,14 -475,27 +487,35 @@@ caption = Subcommand
  
                        Sending SIGHUP causes the running dss process to reload its config file.
                [/help]
+       [option wait]
+               short_opt = w
+               summary = wait until the signalled process has terminated
+               [help]
+                       This option is handy for system shutdown scripts which would like
+                       to terminate the dss daemon process.
+                       Without --wait the dss process which executes the kill subcommand
+                       exits right after the kill(2) system call returns. At this point the
+                       signalled process might still be alive (even if SIGKILL was sent).
+                       If --wait is given, the process waits until the signalled process
+                       has terminated or the timeout expires.
+                       If --wait is not given, the kill subcommand exits successfully if
+                       and only if the signal was sent (i.e., if there exists another dss
+                       process to receive the signal). With --wait it exits successfully
+                       if, additionally, the signalled process has terminated before the
+                       timeout expires.
+                       It makes only sense to use the option for signals which terminate dss.
+               [/help]
 +[subcommand configtest]
 +      purpose = run a configuration file syntax test
 +      [description]
 +              This command checks the command line options and the configuration
 +              file for syntactic correctness. It either reports "Syntax Ok" and
 +              exits successfully or prints information about the first syntax error
 +              detected and terminates with exit code 1.
 +      [/description]
  
  [section copyright]
        Written by Andre Noll
diff --cc err.h
Simple merge