1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
FILE *fp;
gint exit_status;
gchar *command = "/this/is/the/script";
/* execute command */
fp = popen(command, "r");
if (fp == NULL)
{
g_print("Error running %s", command);
}
exit_status = pclose (fp);
g_print("Script exited with status %d", exit_status);
|