All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Richard Zidlicky <rz@linux-m68k.org>
Cc: "Dr. David Alan Gilbert" <gilbertd@treblig.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Of hanging menuconfig [cause found]
Date: Sun, 25 Aug 2002 10:11:11 +0100	[thread overview]
Message-ID: <20020825101111.A21616@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20020824212144.B746@linux-m68k.org>; from rz@linux-m68k.org on Sat, Aug 24, 2002 at 09:21:44PM +0200

On Sat, Aug 24, 2002 at 09:21:44PM +0200, Richard Zidlicky wrote:
> look at dmesg and add an
> 	alias binfmt-xxxx off
> to /etc/modules.conf so similar problems get caught properly - unless 
> you want to actually use an emulator for this architecture of course :)

I believe Dave was saying that the scripts try to run lxdialog, which
returns with an error code (to the program that called it.)  This error
code is not checked by the caller, who just tries again.  So the execve()
system call is already correctly failing.

The problem lies in activate_menu in scripts/Menuconfig; it contains a
loop that calls a small script which then calls lxdialog.  It only tests
for a limited range of return codes:

	0 1 2 3 4 5 6 139 255

The important thing here is the missing two codes (from bash's man page):

       If  a  command  is not found, the child process created to
       execute it returns a status of 127.  If a command is found
       but is not executable, the return status is 126.

We currently handle neither; we just loop and try again.

> Looking at exec.c, why isn't the result of request_module() tested?

That doesn't really tell you anything; that tells you something successful
happened.  It doesn't tell you that you now have (say) the a.out binary
format loaded; that's why we rescan the formats list afterwards.

Anyway, here's a patch that should solve the problem.  Dave - thanks for
finding this odd behaviour.

--- orig/scripts/Menuconfig	Tue Mar  5 19:56:45 2002
+++ linux/scripts/Menuconfig	Sun Aug 25 10:08:44 2002
@@ -905,6 +905,26 @@
 			cleanup
 			exit 139
 			;;
+		126|127)
+			stty sane
+			clear
+			cat << EOM
+
+There seems to be a problem with the lxdialog companion utility which is
+built prior to running Menuconfig.  lxdialog could not be found, or could
+not be executed.  This can be caused when lxdialog has been built for a
+different architecture.
+
+You should rebuild lxdialog.  This can be done by moving to the
+/usr/src/linux/scripts/lxdialog directory and issuing the "make clean all"
+command.
+
+If the problem persists, you may email the maintainer <mec@shout.net> or
+post a message to <linux-kernel@vger.kernel.org> for additional assistance. 
+
+EOM
+			cleanup
+			exit 1
 		esac
 	done
 }

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2002-08-25  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-24 15:13 Of hanging menuconfig [cause found] Dr. David Alan Gilbert
2002-08-24 19:21 ` Richard Zidlicky
2002-08-25  9:11   ` Russell King [this message]
2002-08-24 20:58 ` Sam Ravnborg
2002-08-24 22:36   ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020825101111.A21616@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=gilbertd@treblig.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rz@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.