default=True) parser.add_option( '-j', '--json-output-file', type=str, help='Save json format output into a file, only for `start` command', default=None) return parser if __name__ == '__main__': logger = logging.getLogger() logger.info('Invoked nuclide_server_manager...') if sys.platform == 'darwin': os.environ['PATH'] = darwin_path_helper() + os.pathsep + os.environ.get('PATH', '') parser = get_option_parser() options, args = parser.parse_args(sys.argv[1:]) manager = NuclideServerManager(options) manager.cleanup() configure_nuclide_logger(options.verbose) # Enable core dump by change ulimit to infinity. if options.dump_core: try: _, hard_limit = resource.getrlimit(resource.RLIMIT_CORE) resource.setrlimit(resource.RLIMIT_CORE, (resource.RLIM_INFINITY, hard_limit)) except Exception as e: logger.warn('Failed to enable core dump (%s)', e.message)
help='Save json format output into a file, only for `start` command', default=None) return parser if __name__ == '__main__': parser = get_option_parser() options, args = parser.parse_args(sys.argv[1:]) configure_nuclide_logger(options.verbose) logger = logging.getLogger() logger.info('Invoked nuclide_server_manager...') if sys.platform == 'darwin': os.environ['PATH'] = darwin_path_helper( ) + os.pathsep + os.environ.get('PATH', '') manager = NuclideServerManager(options) manager.cleanup() # Enable core dump by change ulimit to infinity. if options.dump_core: try: _, hard_limit = resource.getrlimit(resource.RLIMIT_CORE) resource.setrlimit(resource.RLIMIT_CORE, (resource.RLIM_INFINITY, hard_limit)) except Exception as e: logger.warn('Failed to enable core dump (%s)' % e) # Clean up old core dumps. They're pretty large, so don't hog disk space. try:
default=None, ) return parser if __name__ == "__main__": parser = get_option_parser() options, args = parser.parse_args(sys.argv[1:]) configure_nuclide_logger(options.verbose) logger = logging.getLogger() logger.info("Invoked nuclide_server_manager...") if sys.platform == "darwin": os.environ["PATH"] = darwin_path_helper() + os.pathsep + os.environ.get("PATH", "") manager = NuclideServerManager(options) manager.cleanup() # Enable core dump by change ulimit to infinity. if options.dump_core: try: _, hard_limit = resource.getrlimit(resource.RLIMIT_CORE) resource.setrlimit(resource.RLIMIT_CORE, (resource.RLIM_INFINITY, hard_limit)) except Exception as e: logger.warn("Failed to enable core dump (%s)", e.message) # Clean up old core dumps. They're pretty large, so don't hog disk space. try: # By default, node core dumps are saved as 'node.<pid>'.