Skip to content

Commit 3f4c629

Browse files
authored
Merge pull request #21 from Shopify/drop-posix-spawn
Drop dependency on posix-spawn
2 parents 5499c37 + 0551a5d commit 3f4c629

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

binaryen.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ Gem::Specification.new do |spec|
1515
spec.homepage = "https://github.com/Shopify/binaryen-rb"
1616
spec.platform = Gem::Platform::RUBY
1717
spec.extensions = ["extconf.rb"]
18-
spec.add_dependency("posix-spawn", "~> 0.3.15")
1918
end

lib/binaryen/command.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# frozen_string_literal: true
22

3-
require "posix/spawn"
43
require "timeout"
54
require "tempfile"
65

76
module Binaryen
87
class Command
9-
include POSIX::Spawn
108
DEFAULT_MAX_OUTPUT_SIZE = 256 * 1024 * 1024 * 1024 # 256 MiB
119
DEFAULT_TIMEOUT = 10
1210
DEFAULT_ARGS_FOR_COMMAND = {}.freeze
@@ -44,7 +42,7 @@ def spawn_command(*args, stderr: nil, stdin: nil)
4442

4543
File.open(File::NULL, "w") do |devnull|
4644
IO.pipe do |err_read, err_write|
47-
pid = POSIX::Spawn.pspawn(
45+
pid = Process.spawn(
4846
*args,
4947
"--output=#{tmpfile.path}",
5048
in_write.path,

0 commit comments

Comments
 (0)