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

FIX: fix the problem of sending the wrong signal. #375

Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions include/boost/process/v2/detail/process_handle_fd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ struct basic_process_handle_fd
return;
if (::kill(pid_, SIGKILL) == -1)
ec = get_last_error();
else
wait(exit_status, ec);
}

void terminate(native_exit_code_type &exit_status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ struct basic_process_handle_fd_or_signal
return;
if (::kill(pid_, SIGKILL) == -1)
ec = get_last_error();
else
wait(exit_status, ec);
}

void terminate(native_exit_code_type &exit_status)
Expand Down
8 changes: 5 additions & 3 deletions include/boost/process/v2/detail/process_handle_signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct basic_process_handle_signal
{
if (pid_ <= 0)
return;
if (::kill(pid_, SIGTERM) == -1)
if (::kill(pid_, SIGINT) == -1)
ec = get_last_error();
}

Expand Down Expand Up @@ -194,7 +194,7 @@ struct basic_process_handle_signal
{
if (pid_ <= 0)
return;
if (::kill(pid_, SIGCONT) == -1)
if (::kill(pid_, SIGSTOP) == -1)
ec = get_last_error();
}

Expand All @@ -212,7 +212,7 @@ struct basic_process_handle_signal
{
if (pid_ <= 0)
return;
if (::kill(pid_, SIGTERM) == -1)
if (::kill(pid_, SIGCONT) == -1)
ec = get_last_error();
}

Expand All @@ -222,6 +222,8 @@ struct basic_process_handle_signal
return;
if (::kill(pid_, SIGKILL) == -1)
ec = get_last_error();
else
wait(exit_status, ec);
}

void terminate(native_exit_code_type &exit_status)
Expand Down
Loading