Signal handling behaviour change after ruby upgrade

Discussion in 'Ruby' started by andrew@walrond.org, Oct 21, 2006.

  1. Guest

    I use an init system written in ruby for my Gnu/linux distro, and it
    makes heavy use of signal handling.

    After upgrading (stable snapshots)
    from
    ruby 1.8.3 (2005-10-26)
    to
    ruby 1.8.5 (2006-10-18)

    nothing much works any more. It seems that signals are no longer
    delivered until _after_ a blocking system call returns. For example:

    #!/bin/ruby -w

    trap("USR1") { puts("USR1") }
    fork { sleep 60 }
    pid = Process::wait()


    If you run this up under a recent snapshot and fire some signals at
    the process with

    kill -USR1 <pid>

    you will get no "USR1" output until AFTER the 60seconds have elapsed and
    Process::wait() returns.

    The old behaviour was to handle signals immediately, with presumably
    SA_RESTART (or whatever it is called) set such that the wait system call
    just carries on unaffected after the signal handler has been run.


    So, is the change intentional? If so, whats the rationale?

    Andrew Walrond
    , Oct 21, 2006
    #1
    1. Advertising

  2. Hi,

    In message "Re: Signal handling behaviour change after ruby upgrade"
    on Sat, 21 Oct 2006 21:17:46 +0900, writes:

    |I use an init system written in ruby for my Gnu/linux distro, and it
    |makes heavy use of signal handling.
    |
    |After upgrading (stable snapshots)
    |from
    | ruby 1.8.3 (2005-10-26)
    |to
    | ruby 1.8.5 (2006-10-18)

    It was caused by a partial backport from the HEAD. The problem was
    reported more than year ago in [ruby-talk:147220] by Guillaume
    Marcais, but somehow I missed it. I am sorry. It will be fixed in
    the snapshot soon.

    matz.
    Yukihiro Matsumoto, Oct 22, 2006
    #2
    1. Advertising

  3. Guest

    On Sun, Oct 22, 2006 at 04:54:21PM +0900, Yukihiro Matsumoto wrote:
    >
    > It was caused by a partial backport from the HEAD. The problem was
    > reported more than year ago in [ruby-talk:147220] by Guillaume
    > Marcais, but somehow I missed it. I am sorry. It will be fixed in
    > the snapshot soon.
    >
    > matz.
    >


    Well ok, but don't let it happen again ;)

    (I don't think you need make apologies; especially here!)

    Andrew Walrond
    , Oct 22, 2006
    #3
  4. --------------enigBDF65B29394D363D5243D424
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable

    Yukihiro Matsumoto wrote:
    > It will be fixed in the snapshot soon.
    >=20


    Time machine batteries dead?

    David Vallner
    Running for the hills


    --------------enigBDF65B29394D363D5243D424
    Content-Type: application/pgp-signature; name="signature.asc"
    Content-Description: OpenPGP digital signature
    Content-Disposition: attachment; filename="signature.asc"

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.5 (MingW32)

    iD8DBQFFPBZJy6MhrS8astoRAs3CAJ9UjciNbTQctifeEJ7uXGP1y9WJZACfaTMf
    edPEWvKBNzy6LOridfEOvc0=
    =ihTS
    -----END PGP SIGNATURE-----

    --------------enigBDF65B29394D363D5243D424--
    David Vallner, Oct 23, 2006
    #4
  5. Hi,

    In message "Re: Signal handling behaviour change after ruby upgrade"
    on Mon, 23 Oct 2006 10:09:17 +0900, David Vallner <> writes:

    |> It will be fixed in the snapshot soon.
    |
    |Time machine batteries dead?

    Usually I am living in the future. But I am in the States now. ;-)

    matz.
    Yukihiro Matsumoto, Oct 23, 2006
    #5
  6. Yukihiro Matsumoto wrote:
    > Hi,
    >
    > In message "Re: Signal handling behaviour change after ruby upgrade"
    > on Mon, 23 Oct 2006 10:09:17 +0900, David Vallner <> writes:
    >
    > |> It will be fixed in the snapshot soon.
    > |
    > |Time machine batteries dead?
    >
    > Usually I am living in the future. But I am in the States now. ;-)
    >
    > matz.
    >
    >
    >

    Yeah ... it's tomorrow where you live. :)
    M. Edward (Ed) Borasky, Oct 23, 2006
    #6
  7. Guest

    On Sun, Oct 22, 2006 at 04:54:21PM +0900, Yukihiro Matsumoto wrote:
    >
    > It was caused by a partial backport from the HEAD. The problem was
    > reported more than year ago in [ruby-talk:147220] by Guillaume
    > Marcais, but somehow I missed it. I am sorry. It will be fixed in
    > the snapshot soon.
    >


    Fixed - thanks!

    Andrew Walrond
    , Oct 30, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Pronath
    Replies:
    1
    Views:
    1,130
    Diez B. Roggisch
    Jan 3, 2005
  2. Jack Orenstein

    threading.Thread vs. signal.signal

    Jack Orenstein, Sep 18, 2005, in forum: Python
    Replies:
    0
    Views:
    443
    Jack Orenstein
    Sep 18, 2005
  3. Peter
    Replies:
    34
    Views:
    1,898
    James Kanze
    Oct 17, 2009
  4. Dmitry Belitsky

    Ruby installation in leopard after upgrade

    Dmitry Belitsky, Nov 25, 2007, in forum: Ruby
    Replies:
    1
    Views:
    81
    Dmitry Belitsky
    Nov 25, 2007
  5. Replies:
    5
    Views:
    270
    Dr.Ruud
    Jul 5, 2006
Loading...

Share This Page