diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-17 13:39:57 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-17 13:58:37 +0100 |
commit | c383c8a51f86f805c3a7e080b5ee32522076ba15 (patch) | |
tree | 29014f18f6c66b69b637ed0a3448e06a24d4ed0b /src/server | |
parent | a224109c8933414fc7e42a1406bb491d6294eef9 (diff) | |
download | chawan-c383c8a51f86f805c3a7e080b5ee32522076ba15.tar.gz |
forkserver: set process titles for processes
this is unfortunately truncated on Linux, but I don't care enough to hack around this
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/forkserver.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/forkserver.nim b/src/server/forkserver.nim index 12b25dc3..5a123fcd 100644 --- a/src/server/forkserver.nim +++ b/src/server/forkserver.nim @@ -14,6 +14,7 @@ import server/buffer import types/urimethodmap import types/url import types/winattrs +import utils/proctitle import utils/strwidth import chagashi/charset @@ -86,6 +87,7 @@ proc forkLoader(ctx: var ForkServerContext, config: LoaderConfig): int = zeroMem(addr ctx, sizeof(ctx)) discard close(pipefd[0]) # close read try: + setProcessTitle("cha loader") runFileLoader(pipefd[1], config) except CatchableError: let e = getCurrentException() @@ -152,6 +154,7 @@ proc forkBuffer(ctx: var ForkServerContext): int = clientPid: pid ) try: + setBufferProcessTitle(url) launchBuffer(config, url, request, attrs, ishtml, charsetStack, loader, ssock) except CatchableError: @@ -171,6 +174,7 @@ proc forkBuffer(ctx: var ForkServerContext): int = return pid proc runForkServer() = + setProcessTitle("cha forkserver") var ctx = ForkServerContext( istream: newPosixStream(stdin.getFileHandle()), ostream: newPosixStream(stdout.getFileHandle()) |