From: Junkone Date: 2007-12-26T08:20:03+09:00 Subject: Re: challenged with signal On Dec 25, 6:02 pm, MonkeeSage wrote: > On Dec 25, 3:23 pm, Junkone wrote: > > > Hello > > I am playing around with the jabber bot fron the linkhttp://nearlyfree.org/fun-jabber-bots. > > > I get a error at the following code next to trap. not sure why it is > > happening. i thought you could send any string to trap a signal. can > > someone help. > > The documentation for Kernel#trap wants to help...but you have to let > it. ;) > > > E:\Tools\CODE>ruby bot1.rb > > bot1.rb:23:in `trap': unsupported signal SIGUSR1 (ArgumentError) > >         from bot1.rb:23 > > > # Wait for the USR1 signal and read a message from ~/.jbot/message > > trap("USR1") { > >   begin > >     bot.deliver(bot.master,File.new(File.join(home, "message")).read) > >   rescue Exception => e > >     puts e > >   end > > Regard, > Jordan Jordon. i understand u wnat me to read the docs which i did over and over again before posting the question. i am still not getting the answer to my prob. as per the ruby docs. << The first parameter is a signal name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a signal number. The characters ``SIG'' may be omitted from the signal name>> so what am i missing. appreciate help here. seede