lib/mongo/crypt/auto_encrypter.rb
def spawn_mongocryptd
        unless @encryption_options
          raise ArgumentError.new('Cannot spawn mongocryptd process without setting auto encryption options on the client.')
        end

        mongocryptd_spawn_args = @encryption_options[:mongocryptd_spawn_args]

        Process.spawn(
          @encryption_options[:mongocryptd_spawn_path],
          *mongocryptd_spawn_args,
          [:out, :err]=>'/dev/null'
        )
      end
# Spawn a new mongocryptd process using the mongocryptd_spawn_path
# and mongocryptd_spawn_args passed in through the extra auto
# encrypt options. Stdout and Stderr of this new process are written
# to /dev/null.
#
# @note To capture the mongocryptd logs, add "--logpath=/path/to/logs"
#   to auto_encryption_options -> extra_options -> mongocrpytd_spawn_args
#
# @return [ Integer ] The process id of the spawned process
#
# @raise [ ArgumentError ] Raises an exception if no encryption options
#   have been provided
Spawn a new mongocryptd process using the mongocryptd_spawn_path
and mongocryptd_spawn_args passed in through the extra auto
encrypt options. Stdout and Stderr of this new process are written
to /dev/null.
Spawn a new mongocryptd process using the mongocryptd_spawn_path and mongocryptd_spawn_args passed in through the extra auto encrypt options . Stdout and Stderr of this new process are written to / dev / null .
def spawn_mongocryptd
        unless @encryption_options
          raise ArgumentError.new('Cannot spawn mongocryptd process without setting auto encryption options on the client.')
        end
        mongocryptd_spawn_args = @encryption_options[:mongocryptd_spawn_args]
        Process.spawn(
          @encryption_options[:mongocryptd_spawn_path],
          *mongocryptd_spawn_args,
          [:out, :err]=>'/dev/null'
        )
      end
def spawn_mongocryptd unless @encryption_options raise ArgumentError . new ( 'Cannot spawn mongocryptd process without setting auto encryption options on the client.' ) end mongocryptd_spawn_args = @encryption_options [ :mongocryptd_spawn_args ] Process . spawn ( @encryption_options [ :mongocryptd_spawn_path ] , * mongocryptd_spawn_args , [ :out , :err ] => '/dev/null' ) end
Spawn a new mongocryptd process using the mongocryptd_spawn_path
and mongocryptd_spawn_args passed in through the extra auto
encrypt options.
Spawn a new mongocryptd process using the mongocryptd_spawn_path and mongocryptd_spawn_args passed in through the extra auto encrypt options .
The process id of the spawned process
The process id of the spawned process
 Integer 
[ ArgumentError ] Raises an exception if no encryption options have been provided
[ ArgumentError ] Raises an exception if no encryption options have been provided
note
To capture the mongocryptd logs, add "--logpath=/path/to/logs" to auto_encryption_options -> extra_options -> mongocrpytd_spawn_args
To capture the mongocryptd logs add " -- logpath = / path / to / logs " to auto_encryption_options - > extra_options - > mongocrpytd_spawn_args