From 7b7235a232439c4bb2038ed5fbbe63e3bffd8202 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 13 Mar 2013 23:22:55 +0100 Subject: [PATCH] doc: add note on process.title max length Fixes #5006. --- doc/api/process.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index a6f160d945..639bdd74bd 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -379,10 +379,21 @@ The PID of the process. console.log('This process is pid ' + process.pid); + ## process.title Getter/setter to set what is displayed in 'ps'. +When used as a setter, the maximum length is platform-specific and probably +short. + +On Linux and OS X, it's limited to the size of the binary name plus the +length of the command line arguments because it overwrites the argv memory. + +v0.8 allowed for longer process title strings by also overwriting the environ +memory but that was potentially insecure/confusing in some (rather obscure) +cases. + ## process.arch