Commit f5504746 authored by Alessandro Rubini's avatar Alessandro Rubini

rvlan: do not wait for pid 0

The problem is exposed when we force all intefaces to "justup", in a
later commit. Some interfaces will have no children to wait for and
would spit this:

   radiusvlan: wait(0): No child processes
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 547c41de
......@@ -332,11 +332,11 @@ int rvlan_fsm(struct rvlan_dev *dev, fd_set *rdset)
close(dev->poll_fd);
dev->poll_fd = -1;
dev->fsm_state = RVLAN_DOWN;
if (!dev->pid)
break;
/* but if we kill our child we must wait reap it */
if (dev->pid) {
kill(dev->pid, SIGINT);
dev->fsm_state = RVLAN_WAIT;
}
kill(dev->pid, SIGINT);
dev->fsm_state = RVLAN_WAIT;
/* fall through */
case RVLAN_WAIT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment