aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2016-02-08 17:07:05 -0600
committerPeter Seebach <peter.seebach@windriver.com>2016-02-08 17:07:05 -0600
commit2932b9e1319c4a376f52ffe8c160685165a2fbaa (patch)
tree1af05e105ef3822b56f9ffa74b05873ba60ceac0
parent8a75f99a652c362b64a14a11d4007690dc7f20d5 (diff)
downloadpseudo-2932b9e1319c4a376f52ffe8c160685165a2fbaa.tar.gz
pseudo-2932b9e1319c4a376f52ffe8c160685165a2fbaa.tar.bz2
pseudo-2932b9e1319c4a376f52ffe8c160685165a2fbaa.zip
pseudo.c: don't shutdown after command without -S.
The automatic shutdown immediately after running a command seems to be causing more problems than it's worth, so now it requires an explicit -S.
-rw-r--r--ChangeLog.txt3
-rw-r--r--pseudo.c7
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.
diff --git a/pseudo.c b/pseudo.c
index e746c3f..8cf946b 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -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);