diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-02 06:01:12 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-02 06:01:12 +0000 |
commit | 815c3462a5db37ae83fc25f3a6dba382af2beb71 (patch) | |
tree | c2d59557f5341202c22bf05448bebaad3df40a19 /signal.c | |
parent | a04f95c800e7d9bc80e601675518a77b73cd98ab (diff) | |
download | ruby-815c3462a5db37ae83fc25f3a6dba382af2beb71.tar.gz ruby-815c3462a5db37ae83fc25f3a6dba382af2beb71.tar.xz ruby-815c3462a5db37ae83fc25f3a6dba382af2beb71.zip |
Finish documenting internal stuff. See Changelog for other details
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -198,6 +198,30 @@ ruby_signal_name(no) return signo2signm(no); } +/* + * call-seq: + * Process.kill(signal, pid, ...) => fixnum + * + * Sends the given signal to the specified process id(s), or to the + * current process if _pid_ is zero. _signal_ may be an + * integer signal number or a POSIX signal name (either with or without + * a +SIG+ prefix). If _signal_ is negative (or starts + * with a minus sign), kills process groups instead of + * processes. Not all signals are available on all platforms. + * + * pid = fork do + * Signal.trap("HUP") { puts "Ouch!"; exit } + * # ... do some work ... + * end + * # ... + * Process.kill("HUP", pid) + * Process.wait + * + * <em>produces:</em> + * + * Ouch! + */ + VALUE rb_f_kill(argc, argv) int argc; |