Sha256: 60756fa502818157deae6fc2f803f9c9345d8a6e380d9cbc4e271b971489b5a0

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

# frozen_string_literal: true

#######################################################################
# example_waitid.rb
#
# Simple demonstration of the Process.waitid method. You can run this
# code via the 'rake example_waitid' task.
#
# Modify as you see fit.
#######################################################################
require 'English'
require 'proc/wait3'

pid = fork { sleep 2 }
p Time.now
Process.waitid(Process::P_PID, pid, Process::WEXITED)
p $CHILD_STATUS

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
proc-wait3-1.9.3 examples/example_waitid.rb
proc-wait3-1.9.2 examples/example_waitid.rb