diff options
author | 2012-10-08 14:47:25 -0700 | |
---|---|---|
committer | 2012-10-08 14:47:25 -0700 | |
commit | 51de26960c35ef707713d5c02568290d66578db3 (patch) | |
tree | 2c5478875d03db06a97f7dc1ecf840280e2c5e45 /fishd.cpp | |
parent | b67526aae8a28a4870edc51ad46a002c6ecf0ecf (diff) |
Make escaping consistent for fish <-> fishd protocol
Fix fork guards to work in fishd
https://github.com/fish-shell/fish-shell/issues/339
Diffstat (limited to 'fishd.cpp')
-rw-r--r-- | fishd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -496,7 +496,7 @@ unlock: /** Event handler. Broadcasts updates to all clients. */ -static void broadcast( int type, const wchar_t *key, const wchar_t *val ) +static void broadcast( fish_message_type_t type, const wchar_t *key, const wchar_t *val ) { connection_t *c; message_t *msg; @@ -540,6 +540,9 @@ static void daemonize() case 0: { + /* Ordinarily there's very limited things we will do after fork, due to multithreading. But fishd is safe because it's single threaded. So don't die in is_forked_child. */ + setup_fork_guards(); + /* Make fishd ignore the HUP signal. */ @@ -557,6 +560,7 @@ static void daemonize() act.sa_handler=&handle_term; sigaction( SIGTERM, &act, 0); break; + } default: |