Commit b7baa1eb authored by Alessandro Rubini's avatar Alessandro Rubini

rvlan: check return value of radclient (do not kill it)

We may use the return value later to see if the server is unresponsive,
and pick another one. Anyways this is cleaner, kill() was a hack.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 47f31dd9
......@@ -268,11 +268,12 @@ int rvlan_fsm(struct rvlan_dev *dev, fd_set *rdset)
dev->name, dev->radbuffer_size);
break;
}
/* Got EOF: kill it to be super-safe and reap the zombie */
/* Got EOF: reap the zombie and see if was in error */
close(dev->poll_fd);
dev->poll_fd = -1;
kill(dev->pid, SIGTERM);
waitpid(dev->pid, &i, 0);
if (verbose)
printf("%s: reaped radclient: 0x%08x\n", dev->name, i);
dev->pid = 0;
/* save a copy for diagnostics */
......
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