From: Andre Date: Sat, 8 Jul 2006 16:52:20 +0000 (+0200) Subject: dbadm: supress writing to stdout while curses is active X-Git-Tag: v0.2.14~59^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=7fe9cfc8e7ada684c73be69a4350727ffa28d7f6 dbadm: supress writing to stdout while curses is active --- diff --git a/dbadm.c b/dbadm.c index 40ecf0b8..4772c969 100644 --- a/dbadm.c +++ b/dbadm.c @@ -150,6 +150,8 @@ static int commit_changes(char *filename) // ITEM **items; int i; char buf[MAXLINE] = "para_client sa "; + int fds[3] = {0, 0, 0}; + pid_t pid; for (i = 0; i < n_choices; ++i) { strcat(buf, item_name(my_items[i])); @@ -162,7 +164,7 @@ static int commit_changes(char *filename) strcat(buf, filename); //printf("old atts: %s\n", atts); //printf("%s\n", buf); - return system(buf); + return para_exec_cmdline_pid(&pid, buf, fds); } static char *get_current_filename(void) @@ -330,11 +332,8 @@ repeat: goto repeat; /* Enter */ case 10: - endwin(); if (atts_modified) commit_changes(filename); - else - printf("Attributes unchanged\n"); goto out; default: goto repeat; @@ -342,7 +341,7 @@ repeat: out: if (my_items) { free_item(my_items[0]); - free_item(my_items[1]); + free_item(my_items[1]); } for (i = 0; i < n_choices; i++) free(choices[i]);