Skip to content

Commit

Permalink
fix(tools): No longer use removed alias io_service
Browse files Browse the repository at this point in the history
Deprecated via chriskohlhoff/asio@d3bbf37
and removed via chriskohlhoff/asio@49fcd03
in Boost 1.87 or Asio 1.33.
  • Loading branch information
dennisklein committed Jan 7, 2025
1 parent ba2face commit d869738
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fairmq/tools/Process.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2017-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2017-2025 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -64,22 +64,22 @@ execute_result execute(const string& cmd, const string& prefix, const string& in

p.Print(cmd);

ba::io_service ios;
ba::io_context ioc;

// containers for std_in
ba::const_buffer inputBuffer(ba::buffer(input));
bp::async_pipe inputPipe(ios);
bp::async_pipe inputPipe(ioc);
// containers for std_out
ba::streambuf outputBuffer;
bp::async_pipe outputPipe(ios);
bp::async_pipe outputPipe(ioc);
// containers for std_err
ba::streambuf errorBuffer;
bp::async_pipe errorPipe(ios);
bp::async_pipe errorPipe(ioc);

const string delimiter = "\n";
ba::steady_timer inputTimer(ios);
ba::steady_timer inputTimer(ioc);
inputTimer.expires_after(std::chrono::milliseconds(1000)); // NOLINT
ba::steady_timer signalTimer(ios);
ba::steady_timer signalTimer(ioc);
signalTimer.expires_after(std::chrono::milliseconds(2000)); // NOLINT

// child process
Expand Down Expand Up @@ -154,7 +154,7 @@ execute_result execute(const string& cmd, const string& prefix, const string& in
};
ba::async_read_until(errorPipe, errorBuffer, delimiter, onStdErr);

ios.run();
ioc.run();
c.wait();

result.exit_code = c.exit_code();
Expand Down

0 comments on commit d869738

Please sign in to comment.