From: Glen Holcomb Date: 2007-07-14T03:03:12+09:00 Subject: Strange Segfault ------=_Part_33689_4735717.1184349795647 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have an interesting problem. I have a script that I wish to use to check a database and then map drives based on who is logging on and the info in the database. When I run the script on any of the machines in the computer lab it segfaults. When I copy the exact same code that is in the script into an irb session and run it I don't have any trouble. I can run the script proper on my office workstation. Does anyone have any idea what could be causing this? I'm running ruby 1.8.6 on all the machines in question. Here is the script: require 'Win32API' require 'xmlrpc/client' class User def lookup user = "0" * 20 getUserName = Win32API.new("advapi32", "GetUserName", 'P', "V") getUserName.call(user) return user end def account_created?(login) server = XMLRPC::Client.new2('http://localhost:3003/user/api') result = server.call('Check', login) if result == 0 return false else return true end end def map_drives(login) system("net use x: /delete /y") system("net use l: /delete /y") system("net use x: //cad1/#{login}") system("net use l: //cad1/shared") end end user = User.new username = user.lookup if user.account_created?(username) user.map_drives(username) end -- "Hey brother christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------=_Part_33689_4735717.1184349795647--