Reference/hclose

From Kx Wiki
Jump to: navigation, search

hclose (hclose function)

Closes a file or process handle.

Example

q)h:hopen `::5001
q)h"til 5"
0 1 2 3 4
q)hclose h
q)h"til 5"
': Bad file descriptor
Warning.png Note: hclose does not flush pending messages on sockets. If you need to process pending msgs on a handle first, then send a sync chaser msg to the remote, e.g. h"".


Warning.png Note: Attempting to hclose 0 will fail with 'domain since 0 needs to stay open for writing in order for plugins to communicate with q and for the q process to send commands to the local log file (if any). To disable reading from handle 0, redirect from /dev/null.

See also


For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox