Index: chrome/app/chrome_dll_main.cc |
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc |
index 52a933495d5a10a3d9c78bbd68b63053e266e76e..652217e40d6bd96787b6a10f7a4ffa1af74835b5 100644 |
--- a/chrome/app/chrome_dll_main.cc |
+++ b/chrome/app/chrome_dll_main.cc |
@@ -338,6 +338,16 @@ int ChromeMain(int argc, const char** argv) { |
return 1; |
#endif |
+#if defined(OS_LINUX) |
+ // Show the man page on --help or -h. |
+ if (parsed_command_line.HasSwitch(L"help") || |
+ parsed_command_line.HasSwitch(L"h")) { |
+ FilePath binary(parsed_command_line.argv()[0]); |
+ int ret = execlp("man", "man", binary.BaseName().value().c_str(), NULL); |
+ LOG(FATAL) << "execlp failed: " << strerror(ret); |
+ } |
+#endif |
+ |
#if defined(OS_POSIX) |
// Always ignore SIGPIPE. We check the return value of write(). |
CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); |