comparison tests/test-inotify @ 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 95e1867f765b
children 97eda2133a9b
comparison
equal deleted inserted replaced
9894:b755a886e8b7 9896:2c2f7593ffc4
1 #!/bin/sh 1 #!/bin/sh
2 2
3 "$TESTDIR/hghave" inotify || exit 80 3 "$TESTDIR/hghave" inotify || exit 80
4 4
5 hg init 5 hg init repo1
6 cd repo1
6 7
7 touch a b c d e 8 touch a b c d e
8 mkdir dir 9 mkdir dir
9 mkdir dir/bar 10 mkdir dir/bar
10 touch dir/x dir/y dir/bar/foo 11 touch dir/x dir/y dir/bar/foo
11 12
12 hg ci -Am m 13 hg ci -Am m
14 cd ..
15 hg clone repo1 repo2
13 16
14 echo "[extensions]" >> $HGRCPATH 17 echo "[extensions]" >> $HGRCPATH
15 echo "inotify=" >> $HGRCPATH 18 echo "inotify=" >> $HGRCPATH
16 19
20 cd repo2
21 echo b >> a
22 # check that daemon started automatically works correctly
23 hg status
24
25 cd ../repo1
17 echo % inserve 26 echo % inserve
18 hg inserve -d --pid-file=hg.pid 27 hg inserve -d --pid-file=hg.pid
19 cat hg.pid >> "$DAEMON_PIDS" 28 cat hg.pid >> "$DAEMON_PIDS"
20 29
21 # let the daemon finish its stuff 30 # let the daemon finish its stuff