[BusyBox] Busybox' "sh" shell on PowerPC

Magnus Damm damm at opensource.se
Mon Apr 2 12:17:23 UTC 2001


My PowerPC target has the same problem.
I've tried both glibc-2.1.3 and glibc-2.2.2.

Any solution yet?

/ magnus

Michael Shmulevich wrote:
> 
> Hello,
> 
> I am seeing weird problems with "sh" on PowerPC platform.
> The executable is dynamically linked against glibc 2.1.3, process
> -/bin/sh is run from inittab.
> 
> Problems:
> 1. when passing empty command like
> ~ # <Enter>
> the shell dies with segmentation fault. I have tracked the problem to
> the point of sh.c line 1785:
> 
>            {
>                free(command);
>                command = (char *) xcalloc(BUFSIZ, sizeof(char));
>                next_command = NULL;
>            }
> 
> free() does the segmentation. command is not NULL, it was allocated, was
> not free()'d before but still, doing free() causes segmentation.
> Anyway, why we want to free() and then allocate again with exactly the
> same size?
> 
> 2. commands seem to ignore control characters from keyboard:
> ~ # cat
> <cat does what it is told to>
> ...
> <Ctrl-C>[ignored] <Ctrl-D>[ignored] <Ctrl-Z> [ignored]
> avctually there is no way to stop the cat now. Only telneting and
> killing the cat process.
> Same thing with ping, and several others... control signals seem to not
> being transferred to child process.
> 
> Thanks in advance for any comments/suggestions.
> 
> Michael.
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox





More information about the busybox mailing list