summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-02 06:01:12 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-02 06:01:12 +0000
commit62cbbfb24be234c3d520630cba2b0ee119db43a6 (patch)
treec389921b2db0f0622c37ac351b61ce7b48bdaeef /signal.c
parent76aec3b5295183786fb2274e4e7105806f406f67 (diff)
Finish documenting internal stuff. See Changelog for other details
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index 3bc2c7f..91e0478 100644
--- a/signal.c
+++ b/signal.c
@@ -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;