From 9d77639f30172b0e3b88ea22df0724df61240161 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 7 Mar 2003 05:59:42 +0000 Subject: * parse.y (dsym): :"symbol string" style should not contain `\0'. * process.c (proc_detach): new method Proc#detach(pid) which create background watcher thread to issue waitpid. [new] * process.c (rb_detach_process): utility function to detach process from C code. * ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread, and detach child process (by creating new idle waitpid watcher thread). * ext/pty/pty.c (pty_syswait): may lost signal stopped child. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/README | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) (limited to 'ext/pty/README') diff --git a/ext/pty/README b/ext/pty/README index a09469d39c..42c7d4f891 100644 --- a/ext/pty/README +++ b/ext/pty/README @@ -33,43 +33,15 @@ following module fungtions: the array is passed to the block as block parameters, and the function itself returns nil. - While the process spawned by this function is active, SIGCHLD - is captured to handle the change of the child process. When the - child process is suspended or finished, an exception is raised. - As all SIGCHLD signal is captured and processed by PTY module, - you can't use other function or method which spawns subprosesses - (including signal() and IO.popen()) while the PTY subprocesses - are active. Otherwise, unexpected exception will occur. To avoid - this problem, see protect_signal() below. - - If this function is called with an iterator block, SIGCHLD signal - is captured only within the block. Therefore, it is risky to use - File objects for PTY subprocess outside the iterator block. - + 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 - This function takes an iterator block. Within the iterator block, - no exception is raised even if any subprocess is terminated. - This function is used to enable functions like system() or IO.popen() - while PTY subprocess is active. For example, - - PTY.spawn("command_foo") do |r,w| - ... - ... - PTY.protect_signal do - system "some other commands" - end - ... - end - - disables to send exception when "some other commands" is - terminated. - - reset_signal - - Disables to handle SIGCHLD while PTY subprocess is active. - + These functions are obsolete in this version of pty. 4. License -- cgit v1.2.3