[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Kill remote process


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