Skip to content

Commit 97f1597

Browse files
committed
remove unused method Popen::kill from cpp-subprocess
1 parent 908c51f commit 97f1597

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/util/subprocess.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@ class Streams
905905
* 4. retcode() - The return code of the exited child.
906906
* 5. pid() - PID of the spawned child.
907907
* 6. poll() - Check the status of the running child.
908-
* 7. kill(sig_num) - Kill the child. SIGTERM used by default.
909908
* 8. send(...) - Send input to the input channel of the child.
910909
* 9. communicate(...) - Get the output/error from the child and close the channels
911910
* from the parent side.
@@ -966,10 +965,6 @@ class Popen
966965

967966
int poll() noexcept(false);
968967

969-
// Does not fail, Caller is expected to recheck the
970-
// status with a call to poll()
971-
void kill(int sig_num = 9);
972-
973968
void set_out_buf_cap(size_t cap) { stream_.set_out_buf_cap(cap); }
974969

975970
void set_err_buf_cap(size_t cap) { stream_.set_err_buf_cap(cap); }
@@ -1137,18 +1132,6 @@ inline int Popen::poll() noexcept(false)
11371132
#endif
11381133
}
11391134

1140-
inline void Popen::kill(int sig_num)
1141-
{
1142-
#ifdef __USING_WINDOWS__
1143-
if (!TerminateProcess(this->process_handle_, (UINT)sig_num)) {
1144-
throw OSError("TerminateProcess", 0);
1145-
}
1146-
#else
1147-
::kill(child_pid_, sig_num);
1148-
#endif
1149-
}
1150-
1151-
11521135
inline void Popen::execute_process() noexcept(false)
11531136
{
11541137
#ifdef __USING_WINDOWS__

0 commit comments

Comments
 (0)