@deeeed/metamask-harness 0.94.1 → 0.94.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -41,8 +41,6 @@ stop_checkout_idb_companions() {
|
|
|
41
41
|
else
|
|
42
42
|
status=$?
|
|
43
43
|
[ "$status" -eq 1 ] && continue
|
|
44
|
-
printf 'Companion ownership is unknown. Next: mm-harness status --target "%s"\n' "$repo" >&2
|
|
45
|
-
return 1
|
|
46
44
|
fi
|
|
47
45
|
if ! stop_verified_process "$pid" "$identity" 'TERM KILL' 0.1 _idb_companion_owned "$repo" "$udid" "$pid" "$identity"; then
|
|
48
46
|
printf 'Companion %s cleanup was not confirmed. Next: mm-harness status --target "%s"\n' "$pid" "$repo" >&2
|
|
@@ -15,7 +15,9 @@ stop_verified_process() {
|
|
|
15
15
|
fi
|
|
16
16
|
for signal in $signals; do
|
|
17
17
|
if ! "$@"; then
|
|
18
|
-
|
|
18
|
+
current="$(process_identity "$pid")"
|
|
19
|
+
if [ -n "$current" ] && [ "$current" != "$identity" ]; then return 0; fi
|
|
20
|
+
if [ -z "$current" ] && ! kill -0 "$pid" 2>/dev/null; then return 0; fi
|
|
19
21
|
printf 'Process %s ownership changed before stop.\n' "$pid" >&2
|
|
20
22
|
return 1
|
|
21
23
|
fi
|
|
@@ -23,6 +25,7 @@ stop_verified_process() {
|
|
|
23
25
|
for attempt in $(seq 1 20); do
|
|
24
26
|
current="$(process_identity "$pid")"
|
|
25
27
|
if [ -z "$current" ] && ! kill -0 "$pid" 2>/dev/null; then return 0; fi
|
|
28
|
+
if [ -n "$current" ] && [ "$current" != "$identity" ]; then return 0; fi
|
|
26
29
|
if [ "$current" != "$identity" ]; then
|
|
27
30
|
printf 'Process %s identity changed during stop.\n' "$pid" >&2
|
|
28
31
|
return 1
|