I need to kill a remote KDB+ session. This can be done in several ways but I'd prefer to use IPC handlers.
I start a KDB+ session:
$ q -p 5000
KDB+ 3.0 2012.11.13 Copyright (C) 1993-2012 Kx Systems
Then I start another KDB session and I manage to kill the server successfully:
$ q
KDB+ 3.0 2012.11.13 Copyright (C) 1993-2012 Kx Systems
q)h: hopen `::5000
q)h(exit;0)
'close
q)\\
But, if I create a script (test.q) with the instructions above, it fails:
$ cat test.q
h: hopen `::5000
h(exit;0)
\\
$ q test.q
KDB+ 3.0 2012.11.13 Copyright (C) 1993-2012 Kx Systems
k){0N!x y}
'close
@
"q"
"h(exit;0)"
q))
Any ideas? I really appreciate.