Re: sh job control

From: Mark Evenson <evenson_at_panix.com>
Date: 12 Jun 2003 11:10:15 -0400
Paul Richards <paul_at_freebsd-services.com> writes:

> I've installed a current built last night and job control no longer
> works in /bin/sh or /usr/local/bin/zsh, but it does with csh. ctr-c and
> ctrl-z are just ignored with both the sh style shells.
> 

[Same experience here, with a guess at what is causing this.  My system is
an IBM ThinkPad X20.  Note I am not really a kernel hacker, and the move in
CURRENT to threads has really dated my knowledge.]  

                                    --

Moving from FreeBSD 5.1beta2 to a slightly post-release CURRENT signals
have stopped working under bash and sh for ordinary users (but not for
root).  Creating a user from scratch verified that the problem did not stem
from initialization process problems.

The following patch to trap.c might have a failure in the logic by
replacing the call via PCPU_GET(spinlocks) by the direct reference to the
thread->critnest, but this is just a guess.


*** /usr/src-5.1-BETA2/sys/i386/i386/trap.c     Wed Apr 30 19:59:27 2003
--- /usr/src-QUIP/sys/i386/i386/trap.c  Sat Jun  7 09:34:34 2003
***************
*** 222,231 ****
                            type);
                        /*
                         * Page faults need interrupts diasabled until
later,
!                        * and we shouldn't enable interrupts while holding
a
!                        * spin lock.
                         */
!                       if (type != T_PAGEFLT && PCPU_GET(spinlocks) ==
NULL)
                                enable_intr();
                }
        }
--- 224,233 ----
                            type);
                        /*
                         * Page faults need interrupts diasabled until
later,
!                        * and we shouldn't enable interrupts while in a
!                        * critical section.
                         */
!                       if (type != T_PAGEFLT && td->td_critnest == 0)
                                enable_intr();
                }
        }

-- 
Mark Evenson <evenson_at_panix.com>

"A screaming comes across the sky.  It has happened before, but there is
nothing to compare to it now."
Received on Thu Jun 12 2003 - 06:10:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:11 UTC