File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ module Async
1111 module Container
1212 module Notify
1313 class Server
14- NOTIFY_SOCKET = "NOTIFY_SOCKET"
1514 MAXIMUM_MESSAGE_SIZE = 4096
1615
1716 def self . load ( message )
Original file line number Diff line number Diff line change @@ -84,15 +84,13 @@ def self.fork(**options)
8484 end
8585 end
8686
87- # def self.spawn(*arguments, name: nil, **options)
88- # self.new(name: name) do |process|
89- # unless options.key?(:out)
90- # options[:out] = process.out
91- # end
92- #
93- # ::Process.spawn(*arguments, **options)
94- # end
95- # end
87+ def self . spawn ( *arguments , name : nil , **options )
88+ self . new ( name : name ) do |process |
89+ Notify ::Pipe . new ( process . out ) . before_spawn ( arguments , options )
90+
91+ ::Process . spawn ( *arguments , **options )
92+ end
93+ end
9694
9795 # Initialize the process.
9896 # @parameter name [String] The name to use for the child process.
@@ -122,6 +120,9 @@ def name= value
122120 # @attribute [String]
123121 attr :name
124122
123+ # @attribute [Integer] The process identifier.
124+ attr :pid
125+
125126 # A human readable representation of the process.
126127 # @returns [String]
127128 def inspect
You can’t perform that action at this time.
0 commit comments