diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-16 19:17:55 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-16 19:17:55 (EST) |
commit | 603bec779ab8f0751bc48b0394aadd261fafdcde (patch) | |
tree | ae5483583ee4b4185500b68870c25b7e23cd52d6 /libopkg/opkg_install.c | |
parent | cd3404e22aa9baba2c617ce4d4d7f53e3f54853c (diff) |
Use vfork()/execvp() instead of system().
Parts based on a patch by Mike Westerhof for OpenEmbedded.
git-svn-id: http://opkg.googlecode.com/svn/trunk@320 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_install.c')
-rw-r--r-- | libopkg/opkg_install.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index 02a2be4..5e8596b 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -1610,13 +1610,8 @@ static int user_prefers_old_conffile(const char *file_name, const char *backup) } if (strcmp(response, "d") == 0) { - char *cmd; - - free(response); - /* XXX: BUG rewrite to use exec or busybox's internal diff */ - sprintf_alloc(&cmd, "diff -u %s %s", backup, file_name); - xsystem(cmd); - free(cmd); + const char *argv[] = {"diff", "-u", backup, file_name, NULL}; + xsystem(argv); printf(" [Press ENTER to continue]\n"); response = file_read_line_alloc(stdin); free(response); |