From 815c3462a5db37ae83fc25f3a6dba382af2beb71 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 2 Jan 2004 06:01:12 +0000 Subject: 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 --- signal.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'signal.c') diff --git a/signal.c b/signal.c index 3bc2c7f7a..91e0478c3 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 + * + * produces: + * + * Ouch! + */ + VALUE rb_f_kill(argc, argv) int argc; -- cgit