Skip to content

Instantly share code, notes, and snippets.

View gist:1164110
=== threading ===
#!/usr/bin/python
import sys
import threading
THR_NUM=4
class thr(threading.Thread) :
def run(self) :
View epoll_et_test.c
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
#include <sys/epoll.h>
#define MAX_EVENTS 10
void* thr_epoll_wait(void* arg)
View epoll_et_test2.c
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
#include <sys/epoll.h>
#define MAX_EVENTS 10
struct epoll_event ev, events[MAX_EVENTS];
int epollfd;
View gist:4115361
trap (40) {
puts "40"
}
Process.kill(40, $$)
View gist:4116155
Index: test/ruby/test_signal.rb
===================================================================
--- test/ruby/test_signal.rb (リビジョン 37745)
+++ test/ruby/test_signal.rb (作業コピー)
@@ -251,7 +251,7 @@
STDOUT.flush
exit 0
end
- sleep
+ sleep 1
View gist:4116178
Index: test/ruby/test_signal.rb
===================================================================
--- test/ruby/test_signal.rb (リビジョン 37745)
+++ test/ruby/test_signal.rb (作業コピー)
@@ -251,10 +251,11 @@
STDOUT.flush
exit 0
end
- sleep
+ Process.kill("INT", $$)
View ruby.stp
[kosaki@localhost]~/ruby/git/build% sudo stap ruby.stp --vp 00001 -c ./ruby-trunk ../test0.rb
WARNING: Eliding assignment to sourcefile at operator '=' at ruby.stp:6:14
WARNING: Eliding assignment to sourceline at operator '=' at ruby.stp:7:14
WARNING: Eliding side-effect-free expression : identifier 'sourcefile' at ruby.stp:6:3
source: sourcefile = user_string($arg3)
^
Pass 5: starting run.
function__entry-Class-inherited
function__entry-Class-inherited
function__entry-Class-inherited
View gist:4130629
diff --git a/Makefile.in b/Makefile.in
index 6984bba..7626ad1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -338,7 +338,7 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
$(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' -e 's/(c
$(Q) $(RM) $@.tmp
-{$(VPATH)}.dmyh.h:
+.dmyh.h:
View gist:4139336
[kosaki@localhost]~/ruby/193/build% make V=1 install
./miniruby -I../lib -I. -I.ext/common ../tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="V=1" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
Usage: rbinstall [options]
-n, --dry-run
--dest-dir=DIR
--extout=DIR
--make=COMMAND
--mantype=MAN
--make-flags, --mflags=FLAGS
-i, --install=TYPE
View gist:4146711
diff --git a/bignum.c b/bignum.c
index 97be53f..47d9689 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2788,6 +2788,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volati
while (j--) zds[j] = xds[j];
}
+ retry:
bds.nx = nx;