The process.title property is an inbuilt application programming interface of the process module which is used to get and set the title of the process.
Return Value: This property returns a string value that specifies the title of the process, current value is ‘ps’.
Note: Assigning the new value to this property will modify the current value. The different platforms can impose a restriction on the maximum length of process title.
Below examples illustrate the use of process.title property in Node.js:
PID: 8852 process title is Command Prompt - node title_1
Before modification: PID: 14012 process title is Command Prompt - node title_2 After modification: PID: 14012 process title is gekchosCustomProcess
Note: The above program will compile and run by using the
node filename.js command.