diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-08 21:43:25 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-11 21:07:39 +0200 |
commit | a9e210121b698ff1b37c5799fb13282478ea050b (patch) | |
tree | 9b206206dfc48f266b89578e4075aee4cc85ea58 /src/plugins/fifo | |
parent | 6925ea3ccbd36e413f2d630eb284325be5560712 (diff) | |
download | weechat-a9e210121b698ff1b37c5799fb13282478ea050b.zip |
fifo: add PID in default FIFO pipe filename (issue #1285)
This is to prevent two WeeChat using the same runtime directory to use the same
FIFO pipe.
Diffstat (limited to 'src/plugins/fifo')
-rw-r--r-- | src/plugins/fifo/fifo-command.c | 7 | ||||
-rw-r--r-- | src/plugins/fifo/fifo-config.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/fifo/fifo-command.c b/src/plugins/fifo/fifo-command.c index 11567d2bf..0d71b7f5d 100644 --- a/src/plugins/fifo/fifo-command.c +++ b/src/plugins/fifo/fifo-command.c @@ -102,8 +102,9 @@ fifo_command_init () "\n" "FIFO pipe is used as remote control of WeeChat: you can send " "commands or text to the FIFO pipe from your shell.\n" - "By default the FIFO pipe is called weechat_fifo and saved in the " - "WeeChat runtime directory (see /debug dirs).\n" + "By default the FIFO pipe is called weechat_fifo_xxx (where xxx is " + "the WeeChat process id) and saved in the WeeChat runtime directory " + "(see /debug dirs).\n" "\n" "The expected format is one of:\n" " plugin.buffer *text or command here\n" @@ -111,7 +112,7 @@ fifo_command_init () "\n" "For example to change your freenode nick:\n" " echo 'irc.server.freenode */nick newnick' " - ">/run/user/1000/weechat/weechat_fifo\n" + ">/run/user/1000/weechat/weechat_fifo_12345\n" "\n" "Please read the user's guide for more info and examples.\n" "\n" diff --git a/src/plugins/fifo/fifo-config.c b/src/plugins/fifo/fifo-config.c index b31d94ff1..7be271197 100644 --- a/src/plugins/fifo/fifo-config.c +++ b/src/plugins/fifo/fifo-config.c @@ -122,7 +122,7 @@ fifo_config_init () "WeeChat PID can be used in path with ${info:pid} " "(path is evaluated, see function string_eval_path_home in " "plugin API reference)"), - NULL, 0, 0, "${weechat_runtime_dir}/weechat_fifo", NULL, 0, + NULL, 0, 0, "${weechat_runtime_dir}/weechat_fifo_${info:pid}", NULL, 0, NULL, NULL, NULL, fifo_config_change_file_path, NULL, NULL, NULL, NULL, NULL); |