File: README.md

package info (click to toggle)
lua-proctitle 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 68 kB
  • sloc: ansic: 23; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# lua-proctitle

Set your process' name from Lua so that it shows up differently in programs like `ps` or `netstat`.

# Example

```lua
local proctitle = require 'proctitle'

proctitle 'new title'
```

# Motivation

Some programs will set the process title of their processes to reflect their roles.  For
example, nginx sets its worker process' titles to indicate that they are worker processes.
I had the situation where I wanted [Prosody](http://prosody.im) listed as 'prosody' in
`netstat` output, so I wrote this little module.

# Portability

This depends on `__progname` from glibc, so this will only work if Lua is using GNU libc as
its C library.  Patches adding support for other configurations are encouraged!