Re: [BUG] running mc "over" running one



Words by Pavel Roskin [Fri, Oct 25, 2002 at 07:13:25PM -0400]:
> Hello, Jose!
> 
> Let's return the discussion to the list.  I've seen some complaints from
> users reading the archives that the important pieces of the discussion are
> missing when the discussion becomes private.
> 

Fair enough :)

> > > 1) Run xterm 2) Run mc in it 3) Press Ctrl-O 4) Run mc from the
> > > command line 5) Press F1.  The help shows up.  Nothing is frozen.
> > 
> > Exactly the same I do except that I when I get to 5) it is frozen, the
> > xterm is black.
> 
> I think it may be a subshell problem, and there are good chances that it's
> fixed in CVS.  At least is was fixed for Cygwin.  I have no idea why it
> happens on your system.
> 

It is indeed a subshell problem, see ahead.

> Please try the latest snapshot from
> http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/snapshots/
> 
      
All debugging, and everything referenced in this mail is related to
this version.

> > 13963 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 13963
> > rt_sigsuspend([]
> 
> There have been significant changes near this point in subshell.c
> 

You mean at synchronize?

> > lrwx------    1 japc     japc           64 Oct 24 17:03 6 -> /dev/pts/12
> > lrwx------    1 japc     japc           64 Oct 24 17:03 7 -> /dev/ptmx
> 
> This means that the second mc has already created the pseudoterminal for
> its subshell.  If it hangs, it happens quite late in the initialization
> process, most likely in the subshell code.
> 

Exactly. I've done some further debugging and find it to stop after
failing at FD_ISSET's in feed_subshell at subshell.c (967 and
following -- only the first call to feed_subshell get FD_ISSET ok). It
then just returns to init_subshell and gets stuck there.

One thing I forgot to include in the previous mail was the state for
both mc shell's:

[japc morgoth:/tmp/mc-2002-10-25-22.ALTERED/src]$ ps auxw | grep 'bash -rcfile'
japc      7796  0.0  1.1  4632 1416 pts/5    S    03:11   0:00 bash -rcfile .bashrc
japc      7802  0.0  0.9  4524 1208 pts/6    T    03:11   0:00 bash -rcfile .bashrc

As you can see the second one stays stopped. That is most certainly
related with the

g_snprintf (precmd, sizeof (precmd), "precmd() {pwd>&%d;kill -STOP $$ }\n",

at subshell.c

which later gets writen to the pty:

write (subshell_pty, precmd, strlen (precmd));

So it is not really the second mc that is stopping/blocking but rather the shell
it is trying to execl.

Of course that if I do a #undefine HAVE_SUBSHELL_SUPPORT the problems go
away.

Hope this helps.

-- 
Jose Celestino <japc co sapo pt> SysAdmin::SAPO.pt http://www.sapo.pt
-----------------------------------------------------
"Lately, the only thing keeping me from becoming a serial killer is my distaste
for manual labor."        -- Dilbert



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