summaryrefslogtreecommitdiffhomepage
path: root/.gitattributes
diff options
context:
space:
mode:
authorLiam Crilly <liam.crilly@nginx.com>2023-06-01 17:53:12 +0100
committerLiam Crilly <liam.crilly@nginx.com>2023-06-01 17:53:12 +0100
commit9ff59e6c4bc09b0252810b709bd5f6aa35f76691 (patch)
tree97f8c08c6f18876331c608fe451f69b5b9d7b12e /.gitattributes
parentb84f6ecad42f4217b6eafb0ceb1e66a75b34e948 (diff)
downloadunit-9ff59e6c4bc09b0252810b709bd5f6aa35f76691.tar.gz
unit-9ff59e6c4bc09b0252810b709bd5f6aa35f76691.tar.bz2
Tools: improved ps(1) portability for unitc.
Improved cross-platform support by trying multiple ps(1) invocations to obtain the unitd command line parameters. Additional error checking detects when this process fails. The first attempt uses `ps -wwo args=COMMAND -p` which has very broad support and has the additional benefit of simplifying the output for more reliable parsing of the process info. If that fails then we fall back to simply `ps`. The parsing of the process info has also changed. Instead of converting '[]' into spaces we now convert them into explicit delimiters (using '^'). This is more reliable as it marks the beginning and the end of the info we care about. Any trailing process information is now ignored (FreeBSD). Additional error handling improves the robustness when starting unitd with a different filename or from a relative path. In this case the control socket and log file detection will fail when running `unitd --help`. Additional error checking and messages are displayed when the control socket cannot be determined. A single warning is shown when the log file cannot be determined.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions