Process::Status

Process::Status

ri

 ------------------------------------------------- Class: Process::Status
       Process::Status  encapsulates the information on the status of a
      running or terminated system process. The built-in variable  $?  is
      either  nil  or a  Process::Status  object.
 
         fork { exit 99 }   #=> 26557
         Process.wait       #=> 26557
         $?.class           #=> Process::Status
         $?.to_i            #=> 25344
         $? >> 8            #=> 99
         $?.stopped?        #=> false
         $?.exited?         #=> true
         $?.exitstatus      #=> 99
 
      Posix systems record information on processes using a 16-bit
      integer. The lower bits record the process status (stopped, exited,
      signaled) and the upper bits possibly contain additional
      information (for example the program's return code in the case of
      exited processes). Pre Ruby 1.8, these bits were exposed directly
      to the Ruby program. Ruby now encapsulates these in a
       Process::Status  object. To maximize compatibility, however, these
      objects retain a bit-oriented interface. In the descriptions that
      follow, when we talk about the integer value of _stat_, we're
      referring to this 16 bit value.
 
 ------------------------------------------------------------------------
 
 
 Instance methods:
 -----------------
      
		
  • 2006/05/12 19:53:19 ==
  • 2006/05/12 19:53:41 >
  • 2006/05/15 12:03:11 at
  • 2006/05/15 12:15:15 dump
  • 2006/05/15 12:20:29 exit
  • 2006/05/15 12:32:31 inspect
  • 2006/05/15 12:45:41 pid
  • 2006/05/12 20:35:50 Process::Status
  • 2006/05/15 12:59:55 stat
  • 2006/05/15 13:01:18 succ
  • 2006/05/15 13:05:16 to_i
  • 2006/05/15 13:05:31 to_s
  • 2006/05/15 13:12:02 wait2
  • 2006/05/15 13:12:08 waitall
  • 2006/05/15 13:12:20 waitpid
  • 2006/05/15 13:12:28 waitpid2
  • 2006/05/15 11:59:52 ^