From: Niklas Hofer Date: 2011-01-05T01:33:33+09:00 Subject: [ruby-core:34062] Ruby 1.9* syscall() on 64 bit systems Hi, this may be an old story, but I did not find any solution for this googeling the internets, Ruby's Issue Tracker has been down for the last day, so I'll ask you: Is it a known bug (feature?) that you cannot syscall() with ruby on a 64bit system? I tested this the last night on a Ubuntu 10.10 amd64 and got serveral reports by Apple users, that $ ruby19 -e 'syscall()' raises a NotImplementedError (not ArgumentError). I dug in the code and found this comment [1], implemented by Nobu in April 2009 [2] and a message on this very mailing list 3 years before [3]. Result of the above actions is: If Ruby 1.9 is built on a machine where sizeof(long) != sizeof(int), the Kernel#syslog method does not get implemented. Through a little experiment [4] I found out that this is the case on EVERY 64 bit system. I took out the preprocessor statement, resulting in a working syscall() - but I am not sure about the (security/stability) implications. Soo.. Is this still intended? Are syscalls so rare that nobody noticed/cared? Or can this be considered a bug? regards, Niklas [1] https://github.com/ruby/ruby/blob/ruby_1_9_2/io.c#L7529 [2] https://github.com/ruby/ruby/commit/5a809d60bd3ea54474e34f897ae60b1ae78bab73#L0R6981 [3] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/8722 [4] https://gist.github.com/764119 -- _ o o | o > = o) /\ - = < (|/ | \|) \ (| | \ /) | (\ \ _ / / \ The game of life is a game of boomerangs. Our thoughts, deeds and words return to us sooner or later with astounding accuracy.