Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: remoting/tools/me2me_virtual_host.py

Issue 10579002: Cleanup: merging three different constants.h into a single header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« remoting/remoting.gyp ('K') | « remoting/remoting.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Virtual Me2Me implementation. This script runs and manages the processes 6 # Virtual Me2Me implementation. This script runs and manages the processes
7 # required for a Virtual Me2Me desktop, which are: X server, X desktop 7 # required for a Virtual Me2Me desktop, which are: X server, X desktop
8 # session, and Host process. 8 # session, and Host process.
9 # This script is intended to run continuously as a background daemon 9 # This script is intended to run continuously as a background daemon
10 # process, running under an ordinary (non-root) user account. 10 # process, running under an ordinary (non-root) user account.
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 if desktop.session_proc is not None and pid == desktop.session_proc.pid: 739 if desktop.session_proc is not None and pid == desktop.session_proc.pid:
740 logging.info("Session process terminated") 740 logging.info("Session process terminated")
741 desktop.session_proc = None 741 desktop.session_proc = None
742 742
743 if desktop.host_proc is not None and pid == desktop.host_proc.pid: 743 if desktop.host_proc is not None and pid == desktop.host_proc.pid:
744 logging.info("Host process terminated") 744 logging.info("Host process terminated")
745 desktop.host_proc = None 745 desktop.host_proc = None
746 746
747 # These exit-codes must match the ones used by the host. 747 # These exit-codes must match the ones used by the host.
748 # See remoting/host/constants.h. 748 # See remoting/base/constants.h.
749 # Delete the host or auth configuration depending on the returned error 749 # Delete the host or auth configuration depending on the returned error
750 # code, so the next time this script is run, a new configuration 750 # code, so the next time this script is run, a new configuration
751 # will be created and registered. 751 # will be created and registered.
752 if os.WEXITSTATUS(status) == 2: 752 if os.WEXITSTATUS(status) == 2:
753 logging.info("Host configuration is invalid - exiting.") 753 logging.info("Host configuration is invalid - exiting.")
754 os.remove(auth.config_file) 754 os.remove(auth.config_file)
755 os.remove(host.config_file) 755 os.remove(host.config_file)
756 return 0 756 return 0
757 elif os.WEXITSTATUS(status) == 3: 757 elif os.WEXITSTATUS(status) == 3:
758 logging.info("Host ID has been deleted - exiting.") 758 logging.info("Host ID has been deleted - exiting.")
759 os.remove(host.config_file) 759 os.remove(host.config_file)
760 return 0 760 return 0
761 elif os.WEXITSTATUS(status) == 4: 761 elif os.WEXITSTATUS(status) == 4:
762 logging.info("OAuth credentials are invalid - exiting.") 762 logging.info("OAuth credentials are invalid - exiting.")
763 os.remove(auth.config_file) 763 os.remove(auth.config_file)
764 return 0 764 return 0
765 765
766 if __name__ == "__main__": 766 if __name__ == "__main__":
767 logging.basicConfig(level=logging.DEBUG) 767 logging.basicConfig(level=logging.DEBUG)
768 sys.exit(main()) 768 sys.exit(main())
OLDNEW
« remoting/remoting.gyp ('K') | « remoting/remoting.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698