Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/process.cr
Original file line number Diff line number Diff line change
@@ -81,15 +81,15 @@ class Process
pid = fork_internal do
with self yield self
end
Process.new pid
new pid
end

# Duplicates the current process.
# Returns a `Process` representing the new child process in the current process
# and `nil` inside the new child process.
def self.fork : self?
if pid = fork_internal
Process.new pid
new pid
else
nil
end
@@ -255,7 +255,7 @@ class Process
fork_error.try &.close
end

protected def initialize(@pid)
private def initialize(@pid)
@waitpid_future = Event::SignalChildHandler.instance.waitpid(pid)
@wait_count = 0
end

0 comments on commit cae9a20

Please sign in to comment.