Skip to content

Instantly share code, notes, and snippets.

@ionelmc
Created August 13, 2013 17:35
Show Gist options
  • Select an option

  • Save ionelmc/6223609 to your computer and use it in GitHub Desktop.

Select an option

Save ionelmc/6223609 to your computer and use it in GitHub Desktop.

Reproduce bug run:

pypy pypy-bug.py

then:

cat output

You will see something like:

(57186, 4, True)(0, 882569408, True)

That is wrong, the tuples with 0 should have False !

import os
import time
import threading
class Thread(threading.Thread):
daemon = True
def run(self):
while 1:
time.sleep(1)
t = Thread()
t.start()
out = file('output', 'w+b', 0)
pid, fd = os.forkpty()
out.write(`pid, fd, t.is_alive()`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment