Project

General

Profile

Actions

Bug #10540

closed

is_process_running can generate error for empty process

Added by Orion Poplawski over 4 years ago. Updated over 4 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
Actions

Also available in: Atom PDF