Race condition in applications assuming IO stops after process death

Bug #1402710 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Fix Released
High
Zygmunt Krynicki

Bug Description

The extcmd interface has, among others, the following two methods:
- on_line()
- on_end()

It seems natural to think that on_line() cannot occur after on_exit(). Applications making this assumption can break as that assumption is not true. If the communication pipe leaks from the started process to a third process that survives its parent's death (such as many daemons and "background" software) and the venerable process doesn't close its stdout/stderr streams then we can indeed see on_line() being called after on_exit().

To guard against this and let apps see "simplified" versions of reality. Extcmd should optionally defer on_end() and on_abnormal_end() after we're certain that no more on_line() events will occur.

Related branches

Zygmunt Krynicki (zyga)
Changed in plainbox:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Zygmunt Krynicki (zkrynicki)
milestone: none → 0.18
Zygmunt Krynicki (zyga)
Changed in plainbox:
status: In Progress → Fix Committed
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.