X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <9ae083a20712201329s46afd5cm1cd6a350df368941@mail.gmail.com>
Date: Thu, 20 Dec 2007 16:29:43 -0500
From: "Frodak Baksik" <frodak17@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Ruby on Rails 2.0.2/Cygwin Bug
In-Reply-To: <d45df6780712200728s19e1fbd6t4dbcc03e872f7685@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <d45df6780712191829xaab8c3kc844f16d04d247ad@mail.gmail.com> 	 <Pine.GSO.4.63.0712192355080.18738@access1.cims.nyu.edu> 	 <d45df6780712200728s19e1fbd6t4dbcc03e872f7685@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Dec 20, 2007 10:28 AM, Mike Boone  wrote:
> On Dec 19, 2007 11:59 PM, Igor Peshansky wrote:
> > Well, /dev/urandom certainly exists in Cygwin.  I'm not a Ruby expert, but
> > considering that adding a puts() before the file open seems to fix it, I'd
> > look somewhere in the Ruby code.  But you can try running the original
> > under strace to see what exactly Ruby is trying to do with /dev/urandom.
>
> I ran strace ruby /usr/bin/rails test_app > strace.txt, and it
> generated 54MB of text. It looks like the last 100 lines or so might
> be relevant, but I don't know how to decipher them. The "No such file
> or directory - /dev/urandom" occurs toward the bottom.
>
> http://boonedocks.net/code/rails-urandom-strace.txt
>
> I'd appreciate it if anyone is willing to have a look. I guess my next
> step might be to rerun the strace with the puts() statement in there
> and see what the difference is.
>
> Thanks,
> Mike.
> http://boonedocks.net/mike/
>
> --


Can you access /dev/urandom outside of ruby?  It might be a simpler
check to ensure that /dev/urandom is working.

Something like to check reading:
head -c 10 /dev/urandom > rnd.bin

and then to check writing:
cat rnd.bin > /dev/urandom
or
strace -o strace.txt sh -c 'cat rnd.bin > /dev/urandom'

It looked like from the strace that reading worked, but writing didn't.

Regards,
Frodak

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

