[BusyBox] Let's release 0.50 today

Larry Doolittle ldoolitt at recycle.lbl.gov
Fri Mar 9 00:16:13 UTC 2001


Erik -
 
> Mind doing a 'cvs up' and trying again?  I just checked in a fix for this type
> of problem,  though there is still one FIXME in sh.c for cases when libc does
> not have wordexp and the user inputs things like 'echo $PATH$0'.

It looks better, but it's not right.  GLOB_NOSYS is not defined in glibc-2.0.7.
I applied the patch below, but the shell sure acts weird.  I haven't isolated
the problem.  Works:
   echo foo
   echo *
   ls -a
Fails: all single word commands (no arguments).  They do nothing, just come
straight back to the prompt.  This includes ls, exit, echo.

     - Larry

--- cvs/busybox/sh.c	Thu Mar  8 16:02:57 2001
+++ sh.c	Thu Mar  8 16:09:25 2001
@@ -983,7 +983,7 @@
 				error_msg("out of space during expansion");
 				return FALSE;
 			}
-			if (retval == GLOB_ABORTED || retval == GLOB_NOSYS) {
+			if (retval != 0 && retval != GLOB_NOMATCH) {
 				/* Some other error.  */
 				error_msg("syntax error");
 				return FALSE;
@@ -1722,9 +1722,9 @@
 
 #ifdef BB_FEATURE_SH_ENVIRONMENT
 				last_return_code=WEXITSTATUS(status);
-#endif
 				debug_printf("'%s' exited -- return code %d\n",
 						job_list.fg->text, last_return_code);
+#endif
 				if (!job_list.fg->running_progs) {
 					/* child exited */
 					remove_job(&job_list, job_list.fg);





More information about the busybox mailing list