Re: subshell (ctrl-o) not working properly



Pavel Tsekov wrote:
On Mon, 27 Feb 2006, Tomasz Chmielewski wrote:

Pavel Tsekov wrote:

(...)

Pressing ctrl + o shows the background, but I can't execute any shell
commands (I return to mc immediately when pressing any key).


Strace available at http://wpkg.org/subshell.strace.gz (strace -o
subshell.strace) and http://wpkg.org/sub.strace.gz (strace -o sub.strace
mc -U).
The strace output suggests that the subshell is being killed by a SIGPWR
signal. I cannot tell why this signal is being sent to the subshell
though. Maybe the OS you are running on your embedded device is
sending this signal for some specific purpose and expects the application
to deal with it... In any case the fact that the subshell is not working
on your platform is not a bug in MC.
Perhaps the subshell consumes so much resources on this tiny router that
  the kernel reports a power failure (that's what SIGPWR is) and kills
the subshell :)

I cannot tell for sure but this doesn't seem to be the right signal for
such scenarios ... The subshell process is just another shell (i.e. bash)
so it consumes as much resources as your login shell.

Surely it's something else.
I'm running Samba + OpenLDAP on that + many other things, so this SIGPWR is perhaps a just bug somewhere (kernel? uClibc? bash? where?).


It's a regular Linux 2.4.30, a major difference is that it's not using
glibc, but uClibc, and not a x86 processor, but a mipsel one.

Are you perhaps targetting an OpenWRT capable device ? If this is the case
I might be able to get a shell access on an ASUS W500G device and try
myself.

Indeed, I want to make mc running on OpenWRT, and it so happens, I'm running it on ASUS WL-500G (deluxe) box (with attached usb-stick).

There is no bash for OpenWRT, so I made it myself.

A bash binary for OpenWRT is available on http://www2.wpkg.org/openwrt/mc/ (together with two versions of mc - subshell-enabled and subshell-disabled).

If you want some other help (OpenWRT cross-compiling environment + explanation on how it works, OpenWRT shell access), let me know.


Not being a kernel hacker, this tells me that the only way to get
subshell working for me would be to make it ignore the SIGPWR I guess?

It will help - yes. However there must be some reason for the signal being
sent. I suggest you to try and find out what it might be.

Can it be that it's running glib-1.2? Perhaps not.


--
Tomasz Chmielewski
WPKG - http://wpkg.org
Software deployment with Samba




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]