- Jun 16, 2017
-
-
Matt Harbison authored
The error return is not 0 for this method, so _check() was doing nothing when an error occurred. This forces the error path, much like the check for OpenProcess(). The only unhandled return is now WAIT_ABANDONED, but I don't see how that could happen in this case.
-
- Jun 07, 2017
-
-
Matt Harbison authored
When I tried importing util.posixfile to work around removing a file opened by another process on Windows, it brought along the declarations in win32.py, which broke the error handling[1]. It doesn't seem worth hacking killdaemons[2] just to isolate these declarations in win32.py, so just declare them here to prevent any future issues. (win32.py mentions the declarations are required by pypy.) [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097905.html [2] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097907.html
-
- May 23, 2017
-
-
Matt Harbison authored
With #serve enabled on Windows, I was getting occasional stacktraces like this: Errored test-hgweb-json.t: Traceback (most recent call last): File "./run-tests.py", line 724, in run self.tearDown() File "./run-tests.py", line 805, in tearDown killdaemons(entry) File "./run-tests.py", line 540, in killdaemons logfn=vlog) File "...\tests\killdaemons.py", line 94, in killdaemons os.unlink(pidfile) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '...\\hgtests.zmpqj3\\child80\\daemon.pids' Adrian suggested using util.posixfile, which works. However, the 'mercurial' package isn't in sys.path when invoking run-tests.py, and it isn't clear that hacking[1] it in is a good thing (especially for test-run-tests.t, which uses an installation in a temp folder). I tried using ProcessMonitor to figure out what the other process is, but that monitoring slows things down to such a degree that the issue doesn't occur. I was ready to blame the virus scanner, but it happens without that too. Looking at the code, I don't see anything that would have the pid file open. But I was able to get through about 20 full test runs without an issue with this minor change, whereas before it was pretty certain to hit this at least once in two or three runs. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097907.html
-
- Aug 18, 2016
-
-
Yuya Nishihara authored
When I was fixing the test-gpg issue, I noticed gpg-connect-agent could print "-1" as a server pid if command was wrong. I'm not pretty sure but nobody would want to kill their running applications by mistake.
-
- Apr 16, 2016
-
-
Robert Stanca authored
-
- Jun 08, 2015
-
-
Matt Mackall authored
-
- Apr 11, 2015
-
-
Augie Fackler authored
test-run-tests.t still passes fine on Python 2.6. run-tests.py --local no longer fails with syntax errors, and now fails looking for xrange. Most changes done with 2to3 -w -f numliterals -f except -f print tests/run-tests.py tests/killdaemons.py after which one import was fixed in run-tests and a __future__ import was added.
-
- Apr 29, 2014
-
-
Yuya Nishihara authored
-
- Mar 10, 2014
-
-
durin42 authored
As far as I'm aware PEP 237[0] means this suffix is superfluous even on Python 2.4, and we can just drop it, which makes this code happy on Python 3. 0: http://legacy.python.org/dev/peps/pep-0237/
-
- Feb 12, 2014
-
-
Simon Heimberg authored
To distinguish between access violaition (process belonging to another user) and a terminated process, PROCESS_QUERY_INFORMATION must be enabled. But TerminateProcess still raises error 5 in both cases. Therefore check before if the process has already terminated.
-
Simon Heimberg authored
-
- Jan 17, 2014
-
-
Simon Heimberg authored
After kill, wait for the process to terminate. When it does not in time, write a debug message similar as in other os. But no 2nd forceful attempt is done.
-
Simon Heimberg authored
The return values of the windll calls are checked and when an error is indicated, it is raised. The handle is still closed properly.
-
- Aug 20, 2012
-
-
Patrick Mézard authored
It makes it easier to use as a generic replacement for kill utility, mostly for Windows tests.
-
- Aug 19, 2012
-
-
Patrick Mézard authored
-
Patrick Mézard authored
-
- Apr 14, 2010
-
-
Nicolas Dumazet authored
-
- Jul 05, 2009
-
-
Alejandro Santos authored
-
- Nov 07, 2008
-
-
Matt Mackall authored
-