| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 '-c', 'Alias /inspector-sources "%s"' % inspector_sources_dir, | 88 '-c', 'Alias /inspector-sources "%s"' % inspector_sources_dir, |
| 89 '-c', 'DefaultType None', | 89 '-c', 'DefaultType None', |
| 90 ] | 90 ] |
| 91 | 91 |
| 92 if self._is_win: | 92 if self._is_win: |
| 93 start_cmd += ['-c', "ThreadsPerChild %d" % (self._number_of_servers
* 8)] | 93 start_cmd += ['-c', "ThreadsPerChild %d" % (self._number_of_servers
* 8)] |
| 94 else: | 94 else: |
| 95 start_cmd += ['-c', "StartServers %d" % self._number_of_servers, | 95 start_cmd += ['-c', "StartServers %d" % self._number_of_servers, |
| 96 '-c', "MinSpareServers %d" % self._number_of_servers, | 96 '-c', "MinSpareServers %d" % self._number_of_servers, |
| 97 '-c', "MaxSpareServers %d" % self._number_of_servers, | 97 '-c', "MaxSpareServers %d" % self._number_of_servers, |
| 98 '-C', 'User "%s"' % self._port_obj.host.environ.get('U
SERNAME', self._port_obj.host.environ.get('USER', '')), | 98 '-C', 'User "%s"' % self._port_obj.host.environ.get('U
SERNAME', |
| 99 se
lf._port_obj.host.environ.get('USER', '')), |
| 99 '-k', 'start'] | 100 '-k', 'start'] |
| 100 | 101 |
| 101 enable_ipv6 = self._port_obj.http_server_supports_ipv6() | 102 enable_ipv6 = self._port_obj.http_server_supports_ipv6() |
| 102 # Perform part of the checks Apache's APR does when trying to listen to | 103 # Perform part of the checks Apache's APR does when trying to listen to |
| 103 # a specific host/port. This allows us to avoid trying to listen to | 104 # a specific host/port. This allows us to avoid trying to listen to |
| 104 # IPV6 addresses when it fails on Apache. APR itself tries to call | 105 # IPV6 addresses when it fails on Apache. APR itself tries to call |
| 105 # getaddrinfo() again without AI_ADDRCONFIG if the first call fails | 106 # getaddrinfo() again without AI_ADDRCONFIG if the first call fails |
| 106 # with EBADFLAGS, but that is not how it normally fails in our use | 107 # with EBADFLAGS, but that is not how it normally fails in our use |
| 107 # cases, so ignore that for now. | 108 # cases, so ignore that for now. |
| 108 # See https://bugs.webkit.org/show_bug.cgi?id=98602#c7 | 109 # See https://bugs.webkit.org/show_bug.cgi?id=98602#c7 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 retval = proc.returncode | 171 retval = proc.returncode |
| 171 err = proc.stderr.read() | 172 err = proc.stderr.read() |
| 172 if retval or len(err): | 173 if retval or len(err): |
| 173 raise server_base.ServerError('Failed to stop %s: %s' % (self._name,
err)) | 174 raise server_base.ServerError('Failed to stop %s: %s' % (self._name,
err)) |
| 174 | 175 |
| 175 # For some reason apache isn't guaranteed to have actually stopped after | 176 # For some reason apache isn't guaranteed to have actually stopped after |
| 176 # the stop command returns, so we wait a little while longer for the | 177 # the stop command returns, so we wait a little while longer for the |
| 177 # pid file to be removed. | 178 # pid file to be removed. |
| 178 if not self._wait_for_action(lambda: not self._filesystem.exists(self._p
id_file)): | 179 if not self._wait_for_action(lambda: not self._filesystem.exists(self._p
id_file)): |
| 179 raise server_base.ServerError('Failed to stop %s: pid file still exi
sts' % self._name) | 180 raise server_base.ServerError('Failed to stop %s: pid file still exi
sts' % self._name) |
| OLD | NEW |