www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: shell exec and parseing

shell exec and parseing

From: A. Mark <gougolith_at_gmail.com>
Date: Thu, 28 Jan 2010 20:25:33 -0800

What would be an easy way to check whether a process has started or
terminated and also to get the pid of a process if I'm executing from a
/bin/sh shell on remote host. I was thinking of issueing commands like echo
$! or ps but then i'll have to parse all those stray messages, so this is
inconsistent.

Also right now I'm parsing messages from the output of my running remote
process under the shell (/bin/sh), is there a neat way to perform sscanf
type reading from the input buffer from channel read? Right now I'm using a
file to write out the buffers contents then i read it back with fscanf
discarding strings that are unknown, but this seems too cumbersome. Any
ideas ?

Thanks !

A.M.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-01-29

the libssh2 team