posix-spawn 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/COPYING +28 -0
- data/Gemfile +2 -0
- data/HACKING +26 -0
- data/README.md +228 -0
- data/Rakefile +36 -0
- data/TODO +23 -0
- data/bin/posix-spawn-benchmark +117 -0
- data/ext/extconf.rb +6 -0
- data/ext/posix-spawn.c +406 -0
- data/lib/posix-spawn.rb +1 -0
- data/lib/posix/spawn.rb +472 -0
- data/lib/posix/spawn/child.rb +212 -0
- data/lib/posix/spawn/version.rb +5 -0
- data/posix-spawn.gemspec +24 -0
- data/test/test_backtick.rb +36 -0
- data/test/test_child.rb +107 -0
- data/test/test_popen.rb +18 -0
- data/test/test_spawn.rb +360 -0
- data/test/test_system.rb +29 -0
- metadata +89 -0
data/test/test_system.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'posix-spawn'
|
3
|
+
|
4
|
+
class SystemTest < Test::Unit::TestCase
|
5
|
+
include POSIX::Spawn
|
6
|
+
|
7
|
+
def test_system
|
8
|
+
ret = system("true")
|
9
|
+
assert_equal ret, true
|
10
|
+
assert_equal $?.exitstatus, 0
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_system_nonzero
|
14
|
+
ret = system("false")
|
15
|
+
assert_equal ret, false
|
16
|
+
assert_equal $?.exitstatus, 1
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_system_nonzero_via_sh
|
20
|
+
ret = system("exit 1")
|
21
|
+
assert_equal ret, false
|
22
|
+
assert_equal $?.exitstatus, 1
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_system_failure
|
26
|
+
ret = system("nosuch")
|
27
|
+
assert_equal ret, false
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: posix-spawn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ryan Tomayko
|
9
|
+
- Aman Gupta
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
|
14
|
+
date: 2011-03-03 00:00:00 -08:00
|
15
|
+
default_executable:
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: rake-compiler
|
19
|
+
prerelease: false
|
20
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
22
|
+
requirements:
|
23
|
+
- - "="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 0.7.6
|
26
|
+
type: :development
|
27
|
+
version_requirements: *id001
|
28
|
+
description: posix-spawn uses posix_spawnp(2) for faster process spawning
|
29
|
+
email:
|
30
|
+
- r@tomayko.com
|
31
|
+
- aman@tmm1.net
|
32
|
+
executables:
|
33
|
+
- posix-spawn-benchmark
|
34
|
+
extensions:
|
35
|
+
- ext/extconf.rb
|
36
|
+
extra_rdoc_files:
|
37
|
+
- COPYING
|
38
|
+
- HACKING
|
39
|
+
files:
|
40
|
+
- .gitignore
|
41
|
+
- COPYING
|
42
|
+
- Gemfile
|
43
|
+
- HACKING
|
44
|
+
- README.md
|
45
|
+
- Rakefile
|
46
|
+
- TODO
|
47
|
+
- bin/posix-spawn-benchmark
|
48
|
+
- ext/extconf.rb
|
49
|
+
- ext/posix-spawn.c
|
50
|
+
- lib/posix-spawn.rb
|
51
|
+
- lib/posix/spawn.rb
|
52
|
+
- lib/posix/spawn/child.rb
|
53
|
+
- lib/posix/spawn/version.rb
|
54
|
+
- posix-spawn.gemspec
|
55
|
+
- test/test_backtick.rb
|
56
|
+
- test/test_child.rb
|
57
|
+
- test/test_popen.rb
|
58
|
+
- test/test_spawn.rb
|
59
|
+
- test/test_system.rb
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://github.com/rtomayko/posix-spawn
|
62
|
+
licenses: []
|
63
|
+
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: "0"
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "0"
|
81
|
+
requirements: []
|
82
|
+
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 1.5.2
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: posix_spawnp(2) for ruby
|
88
|
+
test_files: []
|
89
|
+
|