# HG changeset patch # User Bryan O'Sullivan # Date 1154990708 25200 # Node ID c574ce277a2ba4e55858bcd96a2766b5cb0d2d1d # Parent a2f0b010d6e3f400351cda55802b3e1c59ba8a06 Mostly random attempt to see if fiddling with the child will help the parent. Motivated by problems people are having on Debian sid and FreeBSD. diff -r a2f0b010d6e3 -r c574ce277a2b en/examples/run-example --- a/en/examples/run-example Mon Aug 07 15:35:14 2006 -0700 +++ b/en/examples/run-example Mon Aug 07 15:45:08 2006 -0700 @@ -85,11 +85,17 @@ print >> rcfp, 'export HGRCPATH=$HGRC' print >> rcfp, 'cd %s' % tmpdir rcfp.close() + sys.stdout.flush() + sys.stderr.flush() pid, fd = pty.fork() if pid == 0: - #os.execl(self.shell, self.shell) - os.system('/bin/bash --noediting --noprofile --norc') - sys.exit(0) + cmdline = ['/bin/bash', '--noediting', '--noprofile', '--norc'] + try: + os.execv(cmdline[0], cmdline) + except OSError, err: + print >> sys.stderr, '%s: %s' % (cmdline[0], err.strerror) + sys.stderr.flush() + os._exit(0) self.cfp = os.fdopen(fd, 'w+') try: # setup env and prompt