Project

General

Profile

Actions

Bug #10540

closed
OP RB

is_process_running can generate error for empty process

Bug #10540: is_process_running can generate error for empty process

Added by Orion Poplawski over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Very Low
Category:
Services
Target version:
Start date:
05/09/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

When running svc status for an unknown service you get:

root: pfSsh.php playback svc status unknown
/bin/pgrep -anx ''pgrep: Cannot compile regular expression `' (empty (sub)expression)

Service unknown is stopped.

Two issue here really:
- is_process_running generates an error when $process is "". This is addressed by the attached patch
- svc probably should return something like "Unknown service: unknown".


Files

util-process.patch (477 Bytes) util-process.patch Orion Poplawski, 05/09/2020 09:41 AM

JP Updated by Jim Pingle over 6 years ago Actions #1

  • Category set to Services
  • Priority changed from Normal to Very Low
  • Target version set to 2.5.0

Since that can only happen by manually running an command with an invalid service name, it would be nice to address but not a priority.

JP Updated by Jim Pingle over 6 years ago Actions #3

  • Status changed from New to Pull Request Review

RB Updated by Renato Botelho over 6 years ago Actions #4

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • Target version changed from 2.5.0 to 2.4.5-p1
  • % Done changed from 0 to 100

PR has been merged. Thanks!

JP Updated by Jim Pingle over 6 years ago Actions #5

  • Status changed from Feedback to Resolved

The pgrep error no longer appears when querying an invalid service.

OP Updated by Orion Poplawski over 6 years ago Actions #6

Thanks for the fix.

Actions

Also available in: Atom