/*
* Copyright (C) 2004-2006 Andre Noll <maan@systemlinux.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file dbadm.c simple attribute setting utility for the mysql selector */
// 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]));
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)
goto repeat;
/* Enter */
case 10:
- endwin();
if (atts_modified)
commit_changes(filename);
- else
- printf("Attributes unchanged\n");
goto out;
default:
goto 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]);