[Vala] Newbie question (spawn_async_with_pipes)
- From: Wolfgang Mauer <wolfgang mauer kabelmail de>
- To: Vala-list <vala-list gnome org>
- Subject: [Vala] Newbie question (spawn_async_with_pipes)
- Date: Sun, 17 Feb 2019 14:29:05 +0100
Hi all,
from the valadoc of "spawn_async_with_pipes" i tried the following with
ending in a "received signal SIGSEGV, Segmentation fault."
I hope someone can help me understand/fix that.....
textView.buffer.text = ""; *<------ works fine !!!!*
Process.spawn_async_with_pipes (".", spawn_args, spawn_env,
SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD, null, out pid,
out input, out output, out error);
// stdout:
IOChannel compilerOutput = new IOChannel.unix_new (output);
compilerOutput.add_watch (IOCondition.IN | IOCondition.HUP, (channel,
condition) =>
{
if ((condition & IOCondition.HUP) == IOCondition.HUP)
return false;
string line;
channel.read_line (out line, null, null);
TextIter endIter;
textView.buffer.get_end_iter(out endIter); *<------ **"received
signal SIGSEGV, Segmentation fault."*
textView.buffer.insert(ref endIter, line, -1);
return true;
});
.......
What i am doing wrong???
/Wolfgang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]