rbtrace 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ unless File.exists?("#{CWD}/dst/#{libdir}/libmsgpackc.a")
22
22
  cc = ENV['CC']
23
23
 
24
24
  # build fat binaries on osx
25
- if RUBY_PLATFORM =~ /darwin/ and (archs = Config::CONFIG['LDFLAGS'].scan(/(-arch\s+.+?)(?:\s|$)/).flatten).any?
25
+ if RUBY_PLATFORM =~ /darwin/ and (archs = RbConfig::CONFIG['LDFLAGS'].scan(/(-arch\s+.+?)(?:\s|$)/).flatten).any?
26
26
  ENV['CFLAGS'] = "#{cflags} #{archs.join(' ')}"
27
27
  ENV['LDFLAGS'] = "#{ldflags} #{archs.join(' ')}"
28
28
  end
@@ -40,6 +40,16 @@
40
40
  #define RSTRING_LEN(str) RSTRING(str)->len
41
41
  #endif
42
42
 
43
+
44
+ #ifdef __FreeBSD__
45
+ #define PLATFORM_FREEBSD
46
+ #endif
47
+
48
+ #ifdef __linux__
49
+ #define PLATFORM_LINUX
50
+ #endif
51
+
52
+
43
53
  static uint64_t
44
54
  ru_utime_usec()
45
55
  {
@@ -953,7 +963,14 @@ rbtrace__process_event(msgpack_object cmd)
953
963
 
954
964
  if (outer == 0) {
955
965
  rb_eval_string_protect("$0 = \"[DEBUG] #{Process.ppid}\"", 0);
966
+
967
+ #ifdef PLATFORM_FREEBSD
968
+ // The call setpgrp() is equivalent to setpgid(0,0).
969
+ setpgid(0,0);
970
+ #else
956
971
  setpgrp();
972
+ #endif
973
+
957
974
  pid_t inner = fork();
958
975
 
959
976
  if (inner == 0) {
@@ -1,3 +1,3 @@
1
1
  class RBTracer
2
- VERSION = '0.4.5'
2
+ VERSION = '0.4.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-03 00:00:00.000000000 Z
12
+ date: 2014-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi