comparison mercurial/cmdutil.py @ 9896:2c2f7593ffc4 stable

cmdutil.service: do not _exit(0) in the parent process The fact that a parent process spawns a daemon does not necessarily means that it is the only think it has to do. This was forcing since 7c01599dd340 inotify processes launched implicitely to exit prematurely: when no inotify server was running, "hg st" for example would only launch a inotify server, _exit(0) and thus would not return file statuses. This changeset adds a test for implicitely launched inotify processes. Change to output of test-inotify-1208 is correct: it reflects the normal error message of "hg st" when not dying during "hg inserve" daemon creation.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Tue, 17 Nov 2009 15:00:00 +0900
parents 2c24471d478c
children 9dfe34bf42c7 fb45c1e4396f
comparison
equal deleted inserted replaced
9894:b755a886e8b7 9896:2c2f7593ffc4
569 os.close(wfd) 569 os.close(wfd)
570 os.read(rfd, 1) 570 os.read(rfd, 1)
571 if parentfn: 571 if parentfn:
572 return parentfn(pid) 572 return parentfn(pid)
573 else: 573 else:
574 os._exit(0) 574 return
575 575
576 if initfn: 576 if initfn:
577 initfn() 577 initfn()
578 578
579 if opts['pid_file']: 579 if opts['pid_file']: