Skip to content

Commit 6289490

Browse files
committed
README.md: Update daemonization documentation following discovery that nohup breaks --kill-child
1 parent 002cc11 commit 6289490

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,13 @@ that domain to the server or VM's IP address.
328328

329329
## Daemonizing the server
330330

331-
The easiest way to start a server process that survives the end of your login session is to either
332-
run `nohup ./main.ts` or invoke `./main.ts` from within a terminal multiplexer such as `screen` or
333-
`tmux`.
331+
The easiest way to start a server process that survives the end of your login session is to use
332+
`bash`'s `disown` builtin:
333+
```
334+
$ ./main.ts >disown.log 2>&1 &
335+
$ disown %1
336+
```
337+
338+
Alternatively, you can run the server from within a terminal multiplexer such as `screen` or `tmux`.
339+
Note that disowning via `nohup` currently breaks garbage collection of stale sessions, thereby
340+
causing major resource leaks for instances shared by many users.

0 commit comments

Comments
 (0)