MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | int attach_erq_demon(object ob, int do_close) |
| 3 | int attach_erq_demon(string obname, int do_close) |
| 4 | |
| 5 | DESCRIPTION |
| 6 | This privileged efun is to set/change the connection of the |
| 7 | driver to the external erq demon, thus in effect changing the |
| 8 | demons. |
| 9 | |
| 10 | The connection of the given interactive 'ob'ject is taken away(!) |
| 11 | from it and stored as the erq-connection. The object itself is |
| 12 | then no longer needed, but may stay alive - it is just another |
| 13 | non-interactive object then. |
| 14 | |
| 15 | In the second form, the string will be combined as suffix to |
| 16 | the filename ERQFILE<obname>, which is then the binary to be |
| 17 | forked off as new erq demon. The communication with this erq |
| 18 | will take place over unix domain sockets. ERQFILE defaults to |
| 19 | BINDIR/erq, where BINDIR is the configuration value for the |
| 20 | executable directory. |
| 21 | |
| 22 | If there is alreay an erq demon connected to the driver, the |
| 23 | function will fail unless 'do_close' (default 0) is specified |
| 24 | as 1 (or any other odd integer): then the old connection will |
| 25 | be closed before attaching the new. |
| 26 | The efun returns 1 on success, else 0. |
| 27 | |
| 28 | EXAMPLE |
| 29 | To restart the (default) erq, write in |
| 30 | master.c::stale_erq(closure c): |
| 31 | attach_erq_demon("", 0); |
| 32 | |
| 33 | HISTORY |
| 34 | Introduced in 3.2.1@61. |
| 35 | |
| 36 | SEE ALSO |
| 37 | send_erq(E), erq(C) |