[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Kill remote process
[Thread Prev] | [Thread Next]
- Subject: Kill remote process
- From: Paulo Panhoto <paulo.panhoto@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 13 May 2011 18:48:49 -0300
- To: libssh@xxxxxxxxxx
Hi,
I am writing a program that starts a remote tail process on a host. Here is
a snippet:
channel = channel_new(session);
if (channel == NULL)
throw SSHException(tr("channel_new: %1").arg(ssh_get_error(session)));
if (channel_open_session(channel))
throw SSHException(tr("channel_open_session:
%1").arg(ssh_get_error(session)));
.
.
.
std::string text = "tail -f *.log\n";
channel_write(channel, text.c_str(), text.length());
.
.
.
// I've tried to send signals to stop the tail ....
// channel_request_send_signal(channel, "INT");
channel_request_send_signal(channel, "KILL");
.
.
.
channel_close(channel);
None of the signals worked. The process is still hanging there.
I'm not sure whether this is a bug or a missing detail.
The server is openssh v5.4p1-8.2 (Opensuse 11.3 x86-64). I'm using libssh
version is 0.4.2-1.19 (bundled with opensuse).
Any idea is appreciated.
Regards,
Paulo.
Archive administrator: postmaster@lists.cynapses.org