lib/new_relic/agent/harvester.rb in newrelic_rpm-3.7.3.204 vs lib/new_relic/agent/harvester.rb in newrelic_rpm-3.8.0.218
- old
+ new
@@ -3,14 +3,18 @@
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
module NewRelic
module Agent
class Harvester
+
attr_accessor :starting_pid
# Inject target for after_fork call to avoid spawning thread in tests
def initialize(events, after_forker=NewRelic::Agent)
- @starting_pid = Process.pid
+ # We intentionally don't set our pid as started at this point.
+ # Startup routines must call mark_started when they consider us set!
+ @starting_pid = nil
+
@after_forker = after_forker
@lock = Mutex.new
if events
events.subscribe(:start_transaction, &method(:on_transaction))