def run(hsm, aead_backend, args):
write_pid_file(args.pid_file)<EOL>server_address = (args.listen_addr, args.listen_port)<EOL>httpd = YHSM_KSMServer(server_address,<EOL>partial(YHSM_KSMRequestHandler, hsm, aead_backend, args))<EOL>my_log_message(args.debug or args.verbose, syslog.LOG_INFO,<EOL>"<STR_LIT>"<EOL>% (args.listen_addr, args.listen_port, args.serve_url, args.key_handles, args.device, args.aead_dir, args.db_url))<EOL>httpd.serve_forever()<EOL>
Start a BaseHTTPServer.HTTPServer and serve requests forever.