@alignfirst/pi-background 0.1.3 → 0.1.4

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.
@@ -143,9 +143,13 @@ function linuxProcessTable() {
143
143
  .flatMap((name) => {
144
144
  const pid = Number(name);
145
145
  const fields = readStatFields(pid, HIDDEN_CODES);
146
- return fields ? [linuxTarget(pid, fields)] : [];
146
+ return fields && !isReaping(fields) ? [linuxTarget(pid, fields)] : [];
147
147
  });
148
148
  }
149
+ // A task being reaped reports state X, then pgid -1 once its signal handlers are released.
150
+ function isReaping([state, , group]) {
151
+ return state === "X" || group === "-1";
152
+ }
149
153
  // The fields after the command name, or undefined when the read fails with a skipped code.
150
154
  function readStatFields(pid, skippedCodes) {
151
155
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alignfirst/pi-background",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Session-owned background shell jobs with bounded output and native Pi completion.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas MUR",