OpenWrt Image Release: 2010-12-14
David Kuehling
dvdkhlng at gmx.de
Thu Dec 16 17:11:39 EST 2010
>>>>> "Xiangfu" == Xiangfu Liu <xiangfu at sharism.cc> writes:
> On 12/16/2010 06:34 PM, David Kuehling wrote:
>> Another part to optimize: top showed a line "/bin/sh
>> /usr/bin/gmenu2x". I think we don't need the /bin/sh part. Maybe by
>> using "exec /usr/bin/gmenu2x" in inittab, we're going to get rid of
>> the unused shell process?
> Hi David
> I think we can not get rid of it. it's like the other three 'init'.
> attached to /dev/tty1.
I misunderstood the problem. The problem is that /usr/bin/gmenu2x is a
shell script. So inittab is ok, as you write. But there is still a
problem: the gmenu2x shellscript just launches the real gmenu2x
(/usr/share/gmenu2x/gmenu2x) as a sub-process, so both processes have to
co-exist in memory. The more efficient solution would be to have
exec /usr/share/gmenu2x/gmenu2x
as last command in /usr/bin/gmenu2x , so the executable *replaces* the
shell-script in memory.
I just tried that, unfortunately gmenu2x immediately quits when started
via 'exec'. But only when the shell-script is running from inittab.
Strange, currently have no idea where this is coming from.
cheers,
David
--
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20101216/15f3a79c/attachment.pgp>
More information about the discussion
mailing list