Skip to content

Instantly share code, notes, and snippets.

@rue
Created October 15, 2008 19:07
Show Gist options
  • Select an option

  • Save rue/16981 to your computer and use it in GitHub Desktop.

Select an option

Save rue/16981 to your computer and use it in GitHub Desktop.
rubinius 0.9.0 (ruby 1.8.6 compatible) (9889e9394) (08/04/2008) [i686-apple-darwin9.5.0]
Process.abort
- terminates execution immediately
Process::Constants
- should have the correct constant values on BSD-like systems (FAILED - 1)
- should have the correct constant values on Darwin (FAILED - 2)
Process#detach
- requires one argument
- returns a thread
- reaps the child process's status automatically
Process.egid
- returns the effective group ID for this process
- also goes by Process::GID.eid
- also goes by Process::Sys.getegid
Process.euid
- returns the effective user ID for this process
- also goes by Process::UID.eid
- also goes by Process::Sys.geteuid
Process.fork
- return nil for the child process
- runs a block in a child process
Process.getpgid
- requires one argument
- returns the process group ID for the given process id
- returns the process group ID for the calling process id when passed 0
Process.getpriority
- takes two arguments
- gets the scheduling priority for a specified process
- gets the scheduling priority for a specified process group
- gets the scheduling priority for a specified user
Process.gid
- returns the correct gid for the user executing this process
- also goes by Process::GID.rid
- also goes by Process::Sys.getgid
Process.groups
- takes no arguments
- gets an Array of the gids of groups in the supplemental group access list (ERROR - 3)
- sets the list of gids of groups in the supplemental group access list (ERROR - 4)
Process.initgroups
- requires two arguments
- initializes the supplemental group access list (ERROR - 5)
Process.kill
- requires at least two arguments
- raises an ArgumentError for unknown signals
- doesn't accept lowercase signal names
- doesn't tolerate leading or trailing spaces in signal names
- tests for the existence of a process without sending a signal
- raises an EPERM if permission is denied
Process.maxgroups
- returns the maximum number of gids allowed in the supplemental group access list
- sets the maximum number of gids allowed in the supplemental group access list
Process.pid
- returns the process id of this process
Process.ppid
- returns the process id of the parent of this process
Process.setpgid
- requires two arguments
- sets the process group id of the specified process
Process.setpgrp and Process.getpgrp
- take no arguments
- set and get the process group ID of the calling process
Process.setpgrp and Process.getpgrp Process.setpgrp
- returns zero
Process.setpriority
- takes three arguments
- sets the scheduling priority for a specified process
- sets the scheduling priority for a specified user
Process.setrlimit
- requires at least two arguments
Process.getrlimit
- requires one argument
Process.setrlimit and Process.getrlimit
- limit and get core size (bytes)
- limit and get CPU time (seconds)
- limit and get data segment (bytes)
- limit and get file size (bytes)
- limit and get file descriptors (number)
- limit and get stack size (bytes)
- limit and get total available memory (bytes)
- limit and get total size for mlock(2) (bytes)
- limit and get number of processes for the user (number)
- limit and get resident memory size (bytes)
Process.setsid
- takes no arguments
- establishes this process as a new session and process group leader
Process.times
- returns current cpu times
Process.uid
- returns the correct uid for the user executing this process
- also goes by Process::UID.rid
- also goes by Process::Sys.getuid
Process.wait2
- returns the pid and status of child process
- raises a StandardError if no child processes exist
Process.wait
- raises a Errno::ECHILD if there are no child processes
- returns its childs pid
- sets $? to a Process::Status
- waits for any child process if no pid is given
- waits for a specific child if a pid is given
- waits for a child whose process group ID is that of the calling process
- doesn't block if no child is available when WNOHANG is used
- always accepts flags=0
Process.waitall
- returns an empty array when there are no children
- takes no arguments
- waits for all children
- returns an array of pid/status pairs
1)
Process::Constants should have the correct constant values on BSD-like systems FAILED
Expected -1
to equal 9223372036854775807
#<Object:0x17c38>.__script__ {} at ./spec/frozen/1.8/core/process/constants_spec.rb:10
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Enumerable(Array)#all? {} at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:572
 Enumerable(Array)#all? at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:574
main.__script__ at ./spec/frozen/1.8/core/process/constants_spec.rb:2
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:247
 Compile.unified_load {} at kernel/common/compile.rb:146
 Array#each at kernel/common/array.rb:572
 Compile.unified_load at kernel/common/compile.rb:110
 Kernel.load at kernel/common/compile.rb:397
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Array#each at kernel/common/array.rb:574
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:241
 Compile.load_from_extension at kernel/common/compile.rb:319
 Object#__script__ at kernel/loader.rb:202
2)
Process::Constants should have the correct constant values on Darwin FAILED
Expected -1
to equal 9223372036854775807
#<Object:0x17c38>.__script__ {} at ./spec/frozen/1.8/core/process/constants_spec.rb:25
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Enumerable(Array)#all? {} at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:572
 Enumerable(Array)#all? at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:574
main.__script__ at ./spec/frozen/1.8/core/process/constants_spec.rb:2
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:247
 Compile.unified_load {} at kernel/common/compile.rb:146
 Array#each at kernel/common/array.rb:572
 Compile.unified_load at kernel/common/compile.rb:110
 Kernel.load at kernel/common/compile.rb:397
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Array#each at kernel/common/array.rb:574
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:241
 Compile.load_from_extension at kernel/common/compile.rb:319
 Object#__script__ at kernel/loader.rb:202
3)
Process.groups gets an Array of the gids of groups in the supplemental group access list ERROR
PrimitiveFailure: Unable to find type size for int
 FFI.type_size at kernel/platform/ffi.rb:517
 MemoryPointer#read_array_of_type at kernel/platform/ffi.rb:450
 MemoryPointer#read_array_of_int at kernel/platform/ffi.rb:433
 Process.groups {} at kernel/common/process.rb:204
 MemoryPointer.new at kernel/platform/ffi.rb:324
 Process.groups at kernel/common/process.rb:201
#<Object:0x17c3a>.__script__ {} at ./spec/frozen/1.8/core/process/groups_spec.rb:18
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Enumerable(Array)#all? {} at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:572
 Enumerable(Array)#all? at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:574
main.__script__ at ./spec/frozen/1.8/core/process/groups_spec.rb:3
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:247
 Compile.unified_load {} at kernel/common/compile.rb:146
 Array#each at kernel/common/array.rb:572
 Compile.unified_load at kernel/common/compile.rb:110
 Kernel.load at kernel/common/compile.rb:397
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Array#each at kernel/common/array.rb:574
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:241
 Compile.load_from_extension at kernel/common/compile.rb:319
 Object#__script__ at kernel/loader.rb:202
4)
Process.groups sets the list of gids of groups in the supplemental group access list ERROR
PrimitiveFailure: Unable to find type size for int
 FFI.type_size at kernel/platform/ffi.rb:517
 MemoryPointer#read_array_of_type at kernel/platform/ffi.rb:450
 MemoryPointer#read_array_of_int at kernel/platform/ffi.rb:433
 Process.groups {} at kernel/common/process.rb:204
 MemoryPointer.new at kernel/platform/ffi.rb:324
 Process.groups at kernel/common/process.rb:201
#<Object:0x17c3a>.__script__ {} at ./spec/frozen/1.8/core/process/groups_spec.rb:23
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Enumerable(Array)#all? {} at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:572
 Enumerable(Array)#all? at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:574
main.__script__ at ./spec/frozen/1.8/core/process/groups_spec.rb:3
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:247
 Compile.unified_load {} at kernel/common/compile.rb:146
 Array#each at kernel/common/array.rb:572
 Compile.unified_load at kernel/common/compile.rb:110
 Kernel.load at kernel/common/compile.rb:397
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Array#each at kernel/common/array.rb:574
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:241
 Compile.load_from_extension at kernel/common/compile.rb:319
 Object#__script__ at kernel/loader.rb:202
5)
Process.initgroups initializes the supplemental group access list ERROR
PrimitiveFailure: Unable to find type size for int
 FFI.type_size at kernel/platform/ffi.rb:517
 MemoryPointer#read_array_of_type at kernel/platform/ffi.rb:450
 MemoryPointer#read_array_of_int at kernel/platform/ffi.rb:433
 Process.groups {} at kernel/common/process.rb:204
 MemoryPointer.new at kernel/platform/ffi.rb:324
 Process.groups at kernel/common/process.rb:201
#<Object:0x17c3c>.__script__ {} at ./spec/frozen/1.8/core/process/initgroups_spec.rb:12
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Enumerable(Array)#all? {} at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:572
 Enumerable(Array)#all? at kernel/common/enumerable.rb:462
 Array#each at kernel/common/array.rb:574
main.__script__ at ./spec/frozen/1.8/core/process/initgroups_spec.rb:3
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:247
 Compile.unified_load {} at kernel/common/compile.rb:146
 Array#each at kernel/common/array.rb:572
 Compile.unified_load at kernel/common/compile.rb:110
 Kernel.load at kernel/common/compile.rb:397
 Kernel(Object)#instance_eval at kernel/common/eval.rb:110
 Array#each at kernel/common/array.rb:574
 CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:243
 CompiledMethod#as_script at kernel/common/compiled_method.rb:236
 Compile.single_load at kernel/common/compile.rb:241
 Compile.load_from_extension at kernel/common/compile.rb:319
 Object#__script__ at kernel/loader.rb:202
Finished in 1.590167 seconds
30 files, 79 examples, 144 expectations, 2 failures, 3 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment