I'm trying to tail a fail with using DataReceived callback to get the output.
Unfortunately, DataReceveid is always null. I noticed that DataAvailable is false, so I wonder to what is due this and how I can solve this issue.
shellStream.DataReceived += (sender, dataEvent) =>
{
if (DataReceived != null) // always null !!!
{
string s = shellStream.Read();
if (s != null)
{
Console.WriteLine(s);
}
}
};
shellStream.WriteLine("tail -f foo.log");
Unfortunately, DataReceveid is always null. I noticed that DataAvailable is false, so I wonder to what is due this and how I can solve this issue.
shellStream.DataReceived += (sender, dataEvent) =>
{
if (DataReceived != null) // always null !!!
{
string s = shellStream.Read();
if (s != null)
{
Console.WriteLine(s);
}
}
};
shellStream.WriteLine("tail -f foo.log");