1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/pty
nobu b148948982 * ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and
call raise_from_check() with pid_t.  [ruby-dev:40141]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 08:47:04 +00:00
..
lib * ext/pty/lib/expect.rb (IO#expect): check if peer is closed. 2008-02-18 01:17:44 +00:00
.cvsignore add extconf.h to .cvsignore. 2006-06-24 01:15:08 +00:00
depend * include/ruby/io.h (rb_io_modestr_fmode): renamed from 2008-09-05 11:30:35 +00:00
expect_sample.rb * {ext,lib,test}/**/*.rb: removed trailing spaces. 2009-03-06 03:56:38 +00:00
extconf.rb * ext/pty/extconf.rb: check util.h for OpenBSD. 2008-12-17 10:38:19 +00:00
pty.c * ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and 2010-01-25 08:47:04 +00:00
README
README.expect
README.expect.ja
README.ja
script.rb * {ext,lib,test}/**/*.rb: removed trailing spaces. 2009-03-06 03:56:38 +00:00
shl.rb

pty extension version 0.3 by A.ito

1. Introduction

This extension module adds ruby a functionality to execute an 
arbitrary command through pseudo tty (pty).

2. Install

Follow the instruction below.

(1) Execute

      ruby extconf.rb

    then Makefile is generated.

(3) Do make; make install.

3. What you can do

This extension module defines a module named PTY, which contains
following module fungtions:

   getpty(command)
   spawn(command)

      This function reserves a pty, executes command over the pty 
      and returns an array. The return value is an array with three
      elements. The first element in the array is for reading and the 
      second for writing. The third element is the process ID of the
      child process. If this function is called with an iterator block,
      the array is passed to the block as block parameters, and the
      function itself returns nil.

      When the child process is suspended or finished, an exception is
      raised.  If this function is called with an iterator block,
      exception is raised only within the block.  Child process
      monitor is terminated on block exit.

   protect_signal
   reset_signal

      These functions are obsolete in this version of pty.

4. License

(C) Copyright 1998 by Akinori Ito.

This software may be redistributed freely for this purpose, in full 
or in part, provided that this entire copyright notice is included 
on any copies of this software and applications and derivations thereof.

This software is provided on an "as is" basis, without warranty of any
kind, either expressed or implied, as to any matter including, but not
limited to warranty of fitness of purpose, or merchantability, or
results obtained from use of this software.

5. Bug report

Please feel free to send E-mail to

   aito@ei5sun.yz.yamagata-u.ac.jp

for any bug report, opinion, contribution, etc.