diff options
Diffstat (limited to 'src/platform_linux.cc')
-rw-r--r-- | src/platform_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform_linux.cc b/src/platform_linux.cc index 54937b487..827b8d4ea 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -64,9 +64,15 @@ char** Platform::SetupArgs(int argc, char *argv[]) { void Platform::SetProcessTitle(char *title) { +#ifdef PR_SET_NAME if (process_title) free(process_title); process_title = strdup(title); prctl(PR_SET_NAME, process_title); +#else + Local<Value> ex = Exception::Error( + String::New("'process.title' is not writable on your system, sorry.")); + ThrowException(ex); // Safe, this method is only called from the main thread. +#endif } |