Bug 175079 - [rc.subr] [patch] rc.subr poorly handles recursive run_rc_command invocations
Summary: [rc.subr] [patch] rc.subr poorly handles recursive run_rc_command invocations
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 8.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-06 23:10 UTC by Yuriy Taraday
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments
file.diff (411 bytes, patch)
2013-01-06 23:10 UTC, Yuriy Taraday
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Taraday 2013-01-06 23:10:00 UTC
When custom precmd or cmd calls run_rc_command, postcmd and/or cmd are most likely to be missed.
For example, when squid stop_cmd calls "run_rc_command poll", _postcmd variable is overwritten and my postcmd was never called.

Fix: Proposed patch makes these variables local to function so that they are not overwritten in caller's namespace.

Patch attached with submission follows:
How-To-Repeat: Add your custom stop_postcmd for squid in /etc/rc.conf.d/squid. It will never be called.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-01-07 03:25:40 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:39 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped