[BusyBox] Re: [uClinux-dev] wacky busybox/msh (from uClinux-dist-20020701) SIGWINCH failure?

Erik Andersen andersen at codepoet.org
Tue Jan 28 01:07:03 UTC 2003


On Tue Jan 28, 2003 at 11:46:51AM +0900, Miles Bader wrote:
> My copy of busybox/shell/msh can't handle SINWINCH -- if you resize a
> window while it's waiting for command input, it exits.  I've put
> debugging printfs in cmdedit.c, and the output seems very odd:
> 
> cmdedit.c's SIGWINCH handler gets called, and it gets the new window
> size, but then after the handler returns, the call to safe_read in
> cmdedit_read_input (which was pending when the signal hit) returns an
> error, with errno set to ENOSYS!
> 
> I'm very surprised to see ENOSYS, here and am not sure what it means.
> Does anyone have a clue?  Does anyone's msh work correctly with SIGWINCH?

I just tried it and it works for me, at least on x86.

> The shell is running in a picogui pterm; I suppose the problem could lie
> there (or with ptys or something).

Hmm.  safe_read is one of the few places in busybox that actualy
_does_ check for EINTR.  Regardless, Manuel and I were discussing
just yesterday that we should probably be using sigaction to make
most signals restartable across signals avoiding the need for
checking EINTR in most cases -- not that helps you in any way. :)

Is it possible that sigaction for your architecture is not
properly handing sa_restorer?  I recently found such a problem in
uClibc for both arm and x86...  The symptoms you describe are
consistant with that type of a problem... 

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list