Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve closing behavior when attempting to close a device implementing the service interface #3100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/libYARP_dev/src/yarp/dev/Drivers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ DriverCreator* Drivers::Private::load(const char *name) {
}

static std::string terminatorKey;
static bool terminated = false;
static void handler (int)
{
Time::useSystemClock();
Expand All @@ -343,7 +342,6 @@ static void handler (int)
}
if (!terminatorKey.empty()) {
yCInfo(DRIVERS, "[try %d of 3] Trying to shut down %s", ct, terminatorKey.c_str());
terminated = true;
Terminator::terminateByName(terminatorKey.c_str());
} else {
yCInfo(DRIVERS, "Aborting...");
Expand Down Expand Up @@ -529,6 +527,7 @@ int Drivers::yarpdev(int argc, char *argv[]) {
service = nullptr;
}
}
bool terminated = false;
while (dd.isValid() && !(terminated||(terminee&&terminee->mustQuit()))) {
if (service!=nullptr) {
double now = Time::now();
Expand Down
Loading