From: Tanaka Akira Date: 2003-03-17T00:31:02+09:00 Subject: Re: mapping $? to text message In article <1047827648.000356.4358.nullmailer@picachu.netlab.jp>, matz@ruby-lang.org (Yukihiro Matsumoto) writes: > IIRC, perror(3) prints message corresponding to errno, not return > status, right? If there's a portable way to get text message from > return status, I'd be glad to add the feature. class Process::Status def inspect coredump = coredump? ? " (core dumped)" : "" if exited? "#<#{self.class}: exited: #{exitstatus}#{coredump}>" elsif stopped? "#<#{self.class}: stopped: #{Signal.list.invert[stopsig]}#{coredump}>" elsif signaled? "#<#{self.class}: signaled: #{Signal.list.invert[termsig]}#{coredump}>" else "#<#{self.class}: 0x#{to_i.to_s(16)}#{coredump}>" end end end -- Tanaka Akira