aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-14 01:24:33 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-14 01:24:33 +0000
commit9a966ef1ffdb33434c5defaa61ceeab45cc29152 (patch)
tree2e4ef7885c2e1d5cc436e9014207f2f05e86888d /modutils
parent2f5a200b004e1a7b12e75a42d413f9101198ebd6 (diff)
downloadbusybox-w32-9a966ef1ffdb33434c5defaa61ceeab45cc29152.tar.gz
busybox-w32-9a966ef1ffdb33434c5defaa61ceeab45cc29152.tar.bz2
busybox-w32-9a966ef1ffdb33434c5defaa61ceeab45cc29152.zip
Attempt at fixing bug 815 by upgrading bb_spawn() so that builtins are at
the start of the path. (This should be under the same config option as the standalone shell, but right now that's buried in the shell menu.) Also add the ability to specify CONFIG_BUSYBOX_EXEC_PATH with /proc/self/exe as an overrideable default. git-svn-id: svn://busybox.net/trunk/busybox@15380 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 93e510293..698eed84a 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -666,27 +666,8 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
666 printf("%s module %s\n", do_insert?"Loading":"Unloading", list-> m_name ); 666 printf("%s module %s\n", do_insert?"Loading":"Unloading", list-> m_name );
667 } 667 }
668 if (!show_only) { 668 if (!show_only) {
669 int rc2 = 0; 669 int rc2 = wait4pid(bb_spawn(argv));
670 int status; 670
671 switch (fork()) {
672 case -1:
673 rc2 = 1;
674 break;
675 case 0: //child
676 execvp(argv[0], argv);
677 bb_perror_msg_and_die("exec of %s", argv[0]);
678 /* NOTREACHED */
679 default:
680 if (wait(&status) == -1) {
681 rc2 = 1;
682 break;
683 }
684 if (WIFEXITED(status))
685 rc2 = WEXITSTATUS(status);
686 if (WIFSIGNALED(status))
687 rc2 = WTERMSIG(status);
688 break;
689 }
690 if (do_insert) { 671 if (do_insert) {
691 rc = rc2; /* only last module matters */ 672 rc = rc2; /* only last module matters */
692 } 673 }