Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trigger a wakeup after setting up the listening socket for the agent

This fixes the problem on OS X where opening an agent console would just
hang. Related to #1933.
  • Loading branch information...
commit 32c35a4f201d3747ba7ae3c3979a66b5cc50a3af 1 parent 3e52e6f
@dbussink dbussink authored
Showing with 5 additions and 4 deletions.
  1. +3 −2 vm/agent.cpp
  2. +1 −1  vm/agent.hpp
  3. +1 −1  vm/builtin/system.cpp
View
5 vm/agent.cpp
@@ -170,6 +170,7 @@ namespace rubinius {
add_fd(server_fd_);
make_discoverable();
+ wakeup();
return true;
}
@@ -502,14 +503,14 @@ namespace rubinius {
thread_->stop();
- wakeup(state);
+ wakeup();
thread_->join();
delete thread_;
thread_ = NULL;
}
- void QueryAgent::wakeup(STATE) {
+ void QueryAgent::wakeup() {
char buf = '!';
if(write(write_control(), &buf, 1) < 0) {
std::cerr << "[QA: Write error: " << strerror(errno) << "]\n";
View
2  vm/agent.hpp
@@ -171,7 +171,7 @@ namespace rubinius {
void initialize(STATE);
void start_thread(STATE);
void stop_thread(STATE);
- void wakeup(STATE);
+ void wakeup();
bool setup_local();
bool bind(int port);
View
2  vm/builtin/system.cpp
@@ -1382,7 +1382,7 @@ namespace rubinius {
sock = agent->loopback_socket();
}
- agent->wakeup(state);
+ agent->wakeup();
// dup the descriptor so the lifetime of socket is properly controlled.
return IO::create(state, dup(sock));
}
Please sign in to comment.
Something went wrong with that request. Please try again.