Lonely Lion

Chris McAvoy likes kites

Really Weird Ruby Bug?

with one comment

Not sure if this is a bug or not, I can’t find an existing bug report. I have no idea why this would be this way.

This script:
print "hello"
sleep 5
exit true

run with sudo, breaks. The sleep call never happens.

This script:
print "hello"
sleep 5
Kernel.exit(true)

run with sudo, works like a champ.

Weird, no?

Written by Chris

October 6th, 2006 at 10:37 am

Posted in Ruby

One Response to 'Really Weird Ruby Bug?'

Subscribe to comments with RSS or TrackBack to 'Really Weird Ruby Bug?'.

  1. I’m no Ruby expert, but I would try adding something like:

    begin
    print “hello”
    sleep 5
    exit true
    rescue SystemExit => e
    puts e.to_s
    end

    Just to see what happens.

    – Brian Ray

    brianray

    6 Oct 06 at 3:38 pm

Leave a Reply