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/pkg.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/pkg.c')
-rw-r--r-- | libopkg/pkg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libopkg/pkg.c b/libopkg/pkg.c index 78b6cad..b0c2b69 100644 --- a/libopkg/pkg.c +++ b/libopkg/pkg.c @@ -1195,8 +1195,10 @@ int pkg_run_script(opkg_conf_t *conf, pkg_t *pkg, sprintf_alloc(&cmd, "%s %s", path, args); free(path); - - err = xsystem(cmd); + { + const char *argv[] = {"sh", "-c", cmd, NULL}; + err = xsystem(argv); + } free(cmd); if (err) { |