diff options
-rw-r--r-- | ChangeLog.txt | 3 | ||||
-rw-r--r-- | pseudo.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 9841594..f191020 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +2016-02-08: + * (seebs) require -S to shutdown server when running a command. + 2016-02-05: * (seebs) don't abort search for server on first try. * (seebs) new clients cancel a shutdown request. @@ -343,7 +343,8 @@ main(int argc, char *argv[]) { return pseudo_db_check(opt_B); } - if (opt_S) { + /* If you didn't specify a command, opt_S shuts down here. */ + if (opt_S && argc <= optind) { return pseudo_client_shutdown(); } @@ -418,7 +419,9 @@ main(int argc, char *argv[]) { /* try to hint that we don't think we still need * the server. */ - pseudo_client_shutdown(); + if (opt_S) { + pseudo_client_shutdown(); + } return WEXITSTATUS(rc); } else { rc = execv(fullpath, argv); |