diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-08-16 20:28:00 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-08-17 12:02:29 +0300 |
| commit | e56c8489522e1aebb1309a03d460314138cb35dc (patch) | |
| tree | 816933ac027e7895ea3515136ce7359bad66f392 /mu | |
| parent | 8c706a77db5a2aee6bcc6af53788e35e9805f945 (diff) | |
scm: support --listen flag for uds
Support the --listen flag to mu scm, to start listening on a Unix domain socket.
Diffstat (limited to 'mu')
| -rw-r--r-- | mu/mu-options.cc | 5 | ||||
| -rw-r--r-- | mu/mu-options.hh | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mu/mu-options.cc b/mu/mu-options.cc index 1a11bdb..b91138e 100644 --- a/mu/mu-options.cc +++ b/mu/mu-options.cc @@ -632,8 +632,11 @@ sub_server(CLI::App& sub, Options& opts) static void sub_scm(CLI::App& sub, Options& opts) { + sub.add_flag("--listen", opts.scm.listen, + "Start listening on a domain socket"); sub.add_option("script-path", opts.scm.script_path, "Path to script") - ->type_name("<path>"); + ->type_name("<path>") + ->excludes("--listen"); sub.add_option("script-args", opts.scm.params, "Parameters for script") ->type_name("<parameters>"); } diff --git a/mu/mu-options.hh b/mu/mu-options.hh index ead9ab9..245678d 100644 --- a/mu/mu-options.hh +++ b/mu/mu-options.hh @@ -259,6 +259,7 @@ struct Options { struct Scm { OptString script_path; /**< Path to script (optional) */ StringVec params; /**< Parameters for script (after "--") */ + bool listen; /**< Whether to start listening on a socket */ } scm; |
