Class: ChildProcess::Windows::Process

### Home Classes Methods

### In Files

- lib/childprocess/windows/process.rb

### Parent

ChildProcess::AbstractProcess

### Namespace

- CLASS ChildProcess::Windows::Process::Job

### Methods

- #exited?
- #io
- #stop
- #wait

### Class/Module Index

Quicksearch

- ChildProcess
- ChildProcess::AbstractIO
- ChildProcess::AbstractProcess
- ChildProcess::Error
- ChildProcess::InvalidEnvironmentVariable
- ChildProcess::JRuby
- ChildProcess::JRuby::IO
- ChildProcess::JRuby::Process
- ChildProcess::JRuby::Pump
- ChildProcess::LaunchError
- ChildProcess::MissingPlatformError
- ChildProcess::SubclassResponsibility
- ChildProcess::TimeoutError
- ChildProcess::Tools
- ChildProcess::Tools::Generator
- ChildProcess::Unix
- ChildProcess::Unix::ForkExecProcess
- ChildProcess::Unix::IO
- ChildProcess::Unix::Lib
- ChildProcess::Unix::Lib::Attrs
- ChildProcess::Unix::Lib::FileActions
- ChildProcess::Unix::Platform
- ChildProcess::Unix::PosixSpawnProcess
- ChildProcess::Unix::PosixSpawnProcess::Argv
- ChildProcess::Unix::PosixSpawnProcess::Envp
- ChildProcess::Unix::Process
- ChildProcess::Windows
- ChildProcess::Windows::Handle
- ChildProcess::Windows::IO
- ChildProcess::Windows::IoCounters
- ChildProcess::Windows::JobObjectBasicLimitInformation
- ChildProcess::Windows::JobObjectExtendedLimitInformation
- ChildProcess::Windows::Lib
- ChildProcess::Windows::Process
- ChildProcess::Windows::Process::Job
- ChildProcess::Windows::ProcessBuilder
- ChildProcess::Windows::ProcessInfo
- ChildProcess::Windows::SecurityAttributes
- ChildProcess::Windows::StartupInfo
- Java
- Java::JavaIo
- Java::JavaIo::FileDescriptor
- Java::SunNioCh
- Java::SunNioCh::FileChannelImpl
- FFI
- FFI::MemoryPointer

No matching classes.

# ChildProcess::Windows::Process

### Attributes

pid[R]

### Public Instance Methods

exited?() click to toggle source

    # File lib/childprocess/windows/process.rb, line 37
    def exited?
      return true if @exit_code
      assert_started

      code   = @handle.exit_code
      exited = code != PROCESS_STILL_ACTIVE

      log(:exited? => exited, :code => code)

      if exited
        @exit_code = code
        @handle.close
      end

      exited
    end

io() click to toggle source

    # File lib/childprocess/windows/process.rb, line 7
    def io
      @io ||= Windows::IO.new
    end

stop(timeout = 3) click to toggle source

    # File lib/childprocess/windows/process.rb, line 11
    def stop(timeout = 3)
      assert_started

      log "sending KILL"
      @handle.send(WIN_SIGKILL)

      poll_for_exit(timeout)
    ensure
      close_handle
      close_job_if_necessary
    end

wait() click to toggle source

    # File lib/childprocess/windows/process.rb, line 23
    def wait
      if exited?
        exit_code
      else
        @handle.wait
        @exit_code = @handle.exit_code

        close_handle
        close_job_if_necessary

        @exit_code
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.