Repository navigation
fix macOS build #2767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix macOS build #2767
Changes from 4 commits
a27f513
38c187a
aaae48a
9c16142
2d50921
1d9c744
55e37cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,15 +173,40 @@ _pmda_setup() | |
| { | ||
| # Auto-Install and/or Auto-Remove PMDAs? | ||
| # | ||
| if [ -f $PCP_PMDAS_DIR/pmda.auto.update ] | ||
| then | ||
| # lock file exists, if it is stale, remove it ... a concurrent | ||
| # rc_pmcd could remove it while we're checking, so silently ignore | ||
| # failure to remove the lock file | ||
| # | ||
| __pid=`$PCP_AWK_PROG <$PCP_PMDAS_DIR/pmda.auto.update 2>/dev/null '{ print $1 }'` | ||
| __pname=`$PCP_AWK_PROG <$PCP_PMDAS_DIR/pmda.auto.update 2>/dev/null '{ print $2 }'` | ||
| if [ "$__pname" != rc_pmcd ] | ||
| then | ||
| if rm $PCP_PMDAS_DIR/pmda.auto.update >/dev/null 2>&1 | ||
|
Comment on lines
+202
to
+204
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift Do not remove a lock while its owner is still writing it.
🤖 Prompt for AI Agents |
||
| then | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ stale pmda.auto.update lock removed, bogus owner ($__pname) not rc_pmcd" | ||
| fi | ||
| elif [ -n "$__pid" ] | ||
| then | ||
| if ! $PCP_PS_PROG -p "$__pid" >/dev/null 2>&1 | ||
| then | ||
| if rm $PCP_PMDAS_DIR/pmda.auto.update >/dev/null 2>&1 | ||
| then | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ stale pmda.auto.update lock removed, owner process (pid=$__pid) has vanished" | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
| if $PCP_BINADM_DIR/pmlock -i "$$ rc_pmcd" $PCP_PMDAS_DIR/pmda.auto.update | ||
| then | ||
| # we got the lock, proceed | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ acquire lock" | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ acquire pmda.auto.update lock" | ||
| : | ||
| else | ||
| # one of us is already running | ||
| # | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ lock failed" | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ pmda.auto.update lock failed: `ls -l $PCP_PMDAS_DIR/pmda.auto.update`" | ||
| return | ||
| fi | ||
|
|
||
|
|
@@ -199,7 +224,7 @@ _pmda_setup() | |
| fi | ||
|
|
||
| rm -f $PCP_PMDAS_DIR/pmda.auto.update | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ release lock" | ||
| $PCP_BINADM_DIR/pmpost "PMDA setup: pid=$$ release pmda.auto.update lock" | ||
|
|
||
| # re-instate mainline trap | ||
| # | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.