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

Side by Side Diff: content/browser/child_process_launcher.h

Issue 11316261: Linux: inform the Zygote when it's waiting on a dead process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Adam's remarks. Created 8 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ 6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int child_process_id, 46 int child_process_id,
47 Client* client); 47 Client* client);
48 ~ChildProcessLauncher(); 48 ~ChildProcessLauncher();
49 49
50 // True if the process is being launched and so the handle isn't available. 50 // True if the process is being launched and so the handle isn't available.
51 bool IsStarting(); 51 bool IsStarting();
52 52
53 // Getter for the process handle. Only call after the process has started. 53 // Getter for the process handle. Only call after the process has started.
54 base::ProcessHandle GetHandle(); 54 base::ProcessHandle GetHandle();
55 55
56 // Call this when the child process exits to know what happened to 56 // Call this when the child process exits to know what happened to it.
57 // it. |exit_code| is the exit code of the process if it exited 57 // |known_dead| can be true if we already know the process is dead as it can
58 // (e.g. status from waitpid if on posix, from GetExitCodeProcess on 58 // help the implemention figure the proper TerminationStatus.
59 // Windows). |exit_code| may be NULL. 59 // |exit_code| is the exit code of the process if it exited (e.g. status from
60 base::TerminationStatus GetChildTerminationStatus(int* exit_code); 60 // waitpid if on posix, from GetExitCodeProcess on Windows). |exit_code| may
61 // be NULL.
62 base::TerminationStatus GetChildTerminationStatus(bool known_dead,
63 int* exit_code);
61 64
62 // Changes whether the process runs in the background or not. Only call 65 // Changes whether the process runs in the background or not. Only call
63 // this after the process has started. 66 // this after the process has started.
64 void SetProcessBackgrounded(bool background); 67 void SetProcessBackgrounded(bool background);
65 68
66 // Controls whether the child process should be terminated on browser 69 // Controls whether the child process should be terminated on browser
67 // shutdown. 70 // shutdown.
68 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); 71 void SetTerminateChildOnShutdown(bool terminate_on_shutdown);
69 72
70 private: 73 private:
71 class Context; 74 class Context;
72 75
73 scoped_refptr<Context> context_; 76 scoped_refptr<Context> context_;
74 77
75 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); 78 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher);
76 }; 79 };
77 80
78 } // namespace content 81 } // namespace content
79 82
80 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ 83 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698