CONTRIBUTING
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
Thu, 07 May 2020 03:14:52 -0700
branchstable
changeset 44781 ed684a82e29b
parent 30084 a492610a2fc1
permissions -rw-r--r--
procutil: always waiting on child processes to prevent zombies with 'hg serve' When runbgcommand is invoked by an extension with ensurestart=False, we never called waitpid - which is fine in most cases, except if that's happening on a command server (e.g. chg), in which case the child defunct process will just sit there for as long as the server is running. The actual semantics of SIGCHLD signal handling is a lot more complex than it seems, and the POSIX standard *seems* to read that it's ignored by default and everything would just work without the waitpid if we're not listening for it, but the truth is that it's only ignored if we *explicitly* set it to SIG_IGN. We further cannot set it to SIG_IGN or to a catch-all handler across all of 'hg serve', because Python's suprocess.Popen relies on that signal, and a few specific parts of hg also set custom handlers, so instead we wait for specific PIDs in dedicated threads. I did a poor-man's benchmark of the thread creation and it seems to take about 1ms, which is way better than the 20+ms from ensurestart=True. Differential Revision: https://phab.mercurial-scm.org/D8497
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30084
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
Our full contribution guidelines are in our wiki, please see:
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
https://www.mercurial-scm.org/wiki/ContributingChanges
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
If you just want a checklist to follow, you can go straight to
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
If you can't run the entire testsuite for some reason (it can be
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
difficult on Windows), please at least run `contrib/check-code.py` on
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
any files you've modified and run `python contrib/check-commit` on any
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
commits you've made (for example, `python contrib/check-commit
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
273ce12ad8f1` will report some style violations on a very old commit).