[#14696] Inconsistency in rescuability of "return" — Charles Oliver Nutter <charles.nutter@...>

Why can you not rescue return, break, etc when they are within

21 messages 2008/01/02

[#14738] Enumerable#zip Needs Love — James Gray <james@...>

The community has been building a Ruby 1.9 compatibility tip list on =20

15 messages 2008/01/03
[#14755] Re: Enumerable#zip Needs Love — Martin Duerst <duerst@...> 2008/01/04

Hello James,

[#14772] Manual Memory Management — Pramukta Kumar <prak@...>

I was thinking it would be nice to be able to free large objects at

36 messages 2008/01/04
[#14788] Re: Manual Memory Management — Marcin Raczkowski <mailing.mr@...> 2008/01/05

I would only like to add that RMgick for example provides free method to

[#14824] Re: Manual Memory Management — MenTaLguY <mental@...> 2008/01/07

On Sat, 5 Jan 2008 15:49:30 +0900, Marcin Raczkowski <mailing.mr@gmail.com> wrote:

[#14825] Re: Manual Memory Management — "Evan Weaver" <evan@...> 2008/01/07

Python supports 'del reference', which decrements the reference

[#14838] Re: Manual Memory Management — Marcin Raczkowski <mailing.mr@...> 2008/01/08

Evan Weaver wrote:

[#14911] Draft of some pages about encoding in Ruby 1.9 — Dave Thomas <dave@...>

Folks:

24 messages 2008/01/10

[#14976] nil encoding as synonym for binary encoding — David Flanagan <david@...>

The following just appeared in the ChangeLog

37 messages 2008/01/11
[#14977] Re: nil encoding as synonym for binary encoding — Yukihiro Matsumoto <matz@...> 2008/01/11

Hi,

[#14978] Re: nil encoding as synonym for binary encoding — Dave Thomas <dave@...> 2008/01/11

[#14979] Re: nil encoding as synonym for binary encoding — David Flanagan <david@...> 2008/01/11

Dave Thomas wrote:

[#14993] Re: nil encoding as synonym for binary encoding — Dave Thomas <dave@...> 2008/01/11

[#14980] Re: nil encoding as synonym for binary encoding — Gary Wright <gwtmp01@...> 2008/01/11

[#14981] Re: nil encoding as synonym for binary encoding — Yukihiro Matsumoto <matz@...> 2008/01/11

Hi,

[#14995] Re: nil encoding as synonym for binary encoding — David Flanagan <david@...> 2008/01/11

Yukihiro Matsumoto writes:

[#15050] how to "borrow" the RDoc::RubyParser and HTMLGenerator — Phlip <phlip2005@...>

Core Rubies:

17 messages 2008/01/13
[#15060] Re: how to "borrow" the RDoc::RubyParser and HTMLGenerator — Eric Hodel <drbrain@...7.net> 2008/01/14

On Jan 13, 2008, at 08:54 AM, Phlip wrote:

[#15062] Re: how to "borrow" the RDoc::RubyParser and HTMLGenerator — Phlip <phlip2005@...> 2008/01/14

Eric Hodel wrote:

[#15073] Re: how to "borrow" the RDoc::RubyParser and HTMLGenerator — Eric Hodel <drbrain@...7.net> 2008/01/14

On Jan 13, 2008, at 20:35 PM, Phlip wrote:

[#15185] Friendlier methods to compare two Time objects — "Jim Cropcho" <jim.cropcho@...>

Hello,

10 messages 2008/01/22

[#15194] Can large scale projects be successful implemented around a dynamic programming language? — Jordi <mumismo@...>

A good article I have found (may have been linked by slashdot, don't know)

8 messages 2008/01/24

[#15248] Symbol#empty? ? — "David A. Black" <dblack@...>

Hi --

24 messages 2008/01/28
[#15250] Re: Symbol#empty? ? — Yukihiro Matsumoto <matz@...> 2008/01/28

Hi,

Re: Input related to signal usage in Ruby 1.9 implementation

From: "Chirag Mistry" <chirag80bece@...>
Date: 2008-01-21 06:49:11 UTC
List: ruby-core #15173
Hi All

We had given some inputs for the signal usage in Ruby 1.9 based on our study
of the earlier version of Ruby 1.9 code. We have again analyzed the latest
code of Ruby 1.9 for the defects that we found during our initial
investigation of earlier version of Ruby 1.9 code. We have observed some
changes in the latest code and have accordingly modified the defect
description to reflect the latest code and new line numbers.
Given below are the updated defect descriptions for the signal usage in Ruby
1.9 implementation. It would be better to fix these defects if our
understanding is correct. Please give your feedback on the same.

1. In file trunk/thread_pthread.c, at line no: 153

In the "Init_native_thread" function, posix_signal function is called with
SIGVTALRM value setting an empty function as signal handler.
The "Init_native_thread" function is indirectly called from ruby_init().
As per our understanding, SIGVTALRM is no longer a reserved signal in Ruby
1.9 implementation and therefore no signal handler should be installed for
it.

2. Handling SIGINT
"ruby_finalize_1"(In file trunk/eval.c, at line no: 142) function
calls "ruby_sig_finalize function" (In file trunk/signal.c, at line no:
996). In "ruby_sig_finalize", signal handler SIG_IGN is installed for SIGINT
signal and then signal handler SIG_DFL is installed for SIGINT signal if the
previously installed signal handler was the Ruby handler ("sighandler").
As per our understanding, it may create problem when ruby interpreter is
embedded in a process for a limited period of time. It should not install
signal handler SIG_IGN for SIGINT signal.

Existing code of ruby_sig_finalize is following:
---------------------------------------------------------------------------------------------
void ruby_sig_finalize()
{
    sighandler_t oldfunc;
    oldfunc = ruby_signal(SIGINT, SIG_IGN);
    if (oldfunc == sighandler) {
            ruby_signal(SIGINT, SIG_DFL);
    }
}

We can do below correction in ruby_sig_finalize function:
---------------------------------------------------------------------------------------------
void ruby_sig_finalize()
{
    sighandler_t oldfunc;
    oldfunc = ruby_signal(SIGINT, SIG_DFL);
    if (oldfunc != sighandler) {
            ruby_signal(SIGINT, oldfunc);
    }
}


Regards
Chirag


On 12/20/07, Chirag Mistry <chirag80bece@gmail.com> wrote:
>
>
> We have study the code of yarv (Ruby 1.9 implementation) and as per our
> understanding there are few defects related to signal usage in Ruby 1.9
> implementation. Please give feedback on it.
>
> 1. In file trunk/signal.c, at line number 788:
> SIGVTALRM seems a reserved signal in the ruby interpreter as per
> implementation of trap function of Signal module. But, we did not find
> any reference related with usage of this signal. In earlier versions of
> ruby, SIGVTALRM was used to implement cooperative multitasking (user
> space multithreading) and this signal was reserved for proper
> functioning of Thread module. So in Ruby 1.9, SIGVTALRM is not used any
> more. Empty signal handler is installed for SIGVTALRM in
> Init_native_thread() function.
>
> 2. In file trunk/eval.c, at line number 144:
> In ruby_finalize_1 function, signal handler SIG_DFL is installed for
> SIGINT signal. It gets called automatically when ruby interpreter is
> unloaded (normally or abnormally).
> It may create problem when ruby interpreter is embedded in a process for
> a limited period of time. Because ruby_finalize_1 sets signal handler
> for SIGINT to SIG_DFL without checking previously installed signal
> handler.
>
> Regards
> Chirag
>

In This Thread

Prev Next