[Portland-bugs] [Bug 42774] New: xdg-screensaver should use grep -q option
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Nov 10 02:23:26 PST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=42774
Bug #: 42774
Summary: xdg-screensaver should use grep -q option
Classification: Unclassified
Product: Portland
Version: unspecified
Platform: Other
URL: http://bugs.debian.org/647793
OS/Version: All
Status: NEW
Severity: enhancement
Priority: medium
Component: xdg-utils
AssignedTo: portland-bugs at lists.freedesktop.org
ReportedBy: tanguy+freedesktop at ortolo.eu
Hello,
In xdg-screensaver, there are several calls to grep in if control sequences
conditions. In order not to get the output of grep, its standard output is
redirected to /dev/null.
grep has a -q option that is precisely done for that purpose; in addition it is
a bit faster since it exists on the first match since it has no need to wait to
the end of its input.
I suggest that you replace all the “grep >/dev/null” by “grep -q”. In addition,
the stderr redirections should be removed since they are useful: if an error
occurs, it seems more useful to show it rather than hide it.
This has been the object of a bug report for Debian, which I have put in the
URL field of this one. There is a patch attached; it is only a first shot which
may not be suitable (it removes stderr redirections but adds a -s option which
is not very useful) but I can adapt it.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Portland-bugs
mailing list