@@ -49,24 +49,18 @@ public abstract class AsyncTask : GLib.Object{
4949 protected string script_file = " " ;
5050 protected string working_dir = " " ;
5151
52- public bool background_mode = false ;
53-
5452 // public
5553 public AppStatus status = AppStatus . NOT_STARTED ;
5654
5755 private string _status_line = " " ;
5856 public GLib . Mutex status_line_mutex;
5957
6058 public int exit_code = 0 ;
61- public string error_msg = " " ;
6259 public GLib . Timer timer;
6360 public double progress = 0.0 ;
6461 public double percent = 0.0 ;
6562 public int64 prg_count = 0 ;
6663 public int64 prg_count_total = 0 ;
67- public int64 prg_bytes = 0 ;
68- public int64 prg_bytes_total = 0 ;
69- public string eta = " " ;
7064
7165 // signals
7266 public signal void stdout_line_read (string line );
@@ -125,9 +119,7 @@ public abstract class AsyncTask : GLib.Object{
125119 finish_called = false ;
126120
127121 prg_count = 0 ;
128- prg_bytes = 0 ;
129- error_msg = " " ;
130-
122+
131123 string [] spawn_args = new string [1 ];
132124 spawn_args[0 ] = script_file;
133125
@@ -150,8 +142,6 @@ public abstract class AsyncTask : GLib.Object{
150142 out output_fd,
151143 out error_fd);
152144
153- set_priority();
154-
155145 log_debug(" AsyncTask: child_pid: %d " . printf(child_pid));
156146
157147 // create stream readers
@@ -233,8 +223,6 @@ public abstract class AsyncTask : GLib.Object{
233223 err_line = dis_err. read_line (null );
234224 while (err_line != null ) {
235225 if (err_line. length > 0 ){
236- error_msg + = " %s\n " . printf(err_line);
237-
238226 parse_stderr_line(err_line);
239227 stderr_line_read(err_line); // signal
240228 }
@@ -361,30 +349,6 @@ public abstract class AsyncTask : GLib.Object{
361349 }
362350 }
363351
364- public void set_priority () {
365-
366- if (background_mode){
367- set_priority_value(5 );
368- }
369- else {
370- set_priority_value(0 );
371- }
372- }
373-
374- public void set_priority_value (int prio ) {
375-
376- Pid app_pid = Posix . getpid();
377- process_set_priority (app_pid, prio);
378-
379- if (status == AppStatus . RUNNING ) {
380- process_set_priority (child_pid, prio);
381-
382- foreach (Pid sub_child_pid in get_process_children (child_pid)) {
383- process_set_priority (sub_child_pid, prio);
384- }
385- }
386- }
387-
388352 public string stat_time_elapsed{
389353 owned get {
390354 long elapsed = (long ) timer_elapsed(timer);
0 commit comments