xonsh/slug

PG doesn't initialize with staggered start

Opened this issue · 2 comments

If you start the individual processes in a process group, the process group is not initialized correctly, causing the processes to not properly join the group nor the group created.

with ProcessGroup() as pg:
  pipe = Pipe()
  spam = Process(['spam'], stdout=pipe.side_in)
  pg.add(spam)
  eggs = Process(['eggs'], stdin=pipe.side_out)
  pg.add(spam)
spam.start()
eggs.start()
eggs.join()
pg.kill()
pg.join()

Also, I'm pretty sure POSIX can't add a process after it's started.

Windows also fails this test, although through a different mechanism.