lkml.org 
[lkml]   [1997]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [rfc] posix.4 signals implementation
    Date
    >Trevor Johnson <trevor@jpj.net>:
    > >Dean Gaudet <dgaudet-list-linux-kernel@arctic.org>:
    > > While people are discussing posix signals I'd just like to point out again
    > > that the 2.0 -> 2.0.1 changes for signal handling broke various binaries.
    > > For example, to get a working bash (I don't think any distributions do
    > > this) you have to -DBROKEN_WAITPID while building it. Here is an example
    > > where it fails:
    > >
    > > cat >bad <<EOF
    > > #!/bin/sh
    > > ed $*
    > > EOF
    > > chmod +x bad
    > > ./bad bad
    > >
    > > Now ^Z and fg that repeatedly. Eventually you'll hit a race condition
    > > causing bash to exit and leave ed lying around. If you don't like ed,
    > > replace it with vi (elvis or vim).
    >
    > I brought it to the foreground 62 times using ed, and 63 times with vi,
    > but didn't see the problem. I know that doesn't prove there is no
    > problem. I have:
    >
    > bash 2.00.0(1)-release, linked with glibc 2.0.3 and libtermcap 2.0.8

    Interesting. With bash 1.14.7, libc-5.4.28, linux-2.0.30, I get a
    problem with the ^Z, fg sequence if I run "./bad bad" on a text
    virtual console, but no problem shows up when running from an xterm.

    I'm guessing it's something to do with text virtual consoles. Here's
    another text virtual console problem

    cat > bad2 <<EOF
    #! /bin/sh
    while date > /dev/tty; do sleep 1; done
    EOF
    chmod a+x bad2

    Now run bad2 on two or more virtual consoles, and ^S on one of them.
    They all stop producing date output!

    \
     
     \ /
      Last update: 2005-03-22 13:39    [W:6.831 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site