Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671406 - app-admin/restart-services-0.14.1 improve parsing of stat files
Summary: app-admin/restart-services-0.14.1 improve parsing of stat files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-11-18 07:52 UTC by Fredrik Eriksson
Modified: 2018-11-19 10:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
improve parsing of stat files (restart-services-fix-stat-file-parsing.patch,456 bytes, patch)
2018-11-18 07:52 UTC, Fredrik Eriksson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Eriksson 2018-11-18 07:52:06 UTC
Created attachment 555530 [details, diff]
improve parsing of stat files

I got the following output from restart-services:


-> Searching for services that need to be restarted ... //usr/sbin/restart-services: line 131: [[: slee): syntax error in expression (error token is ")")


Turns out to be a process who's command field contained whitespace:


# cat /proc/19311/stat
19311 (ddclient - slee) S 1 19278 19278 0 /../


The attached patch makes restart-services use a bash regex to parse this file instead of a simple field selection.
Comment 1 Marc Schiffbauer gentoo-dev 2018-11-19 10:25:49 UTC
Thanks for reporting!

Fixed in 0.14.2