Skip to content

exit

Exit KDB-X

exit x    exit[x]

Where x is a non-negative integer, stops the KDB-X process with x as the exit code.

q)exit 42
$ echo $?
42

The operating system keeps only the lowest 8 bits of the exit code, so exit 256 exits with status 0. A non-integer argument, such as a float or a symbol, signals a type error.

exit does not ask for confirmation at the console

Before exiting, q calls .z.exit if it is defined.

reval and -u 1 on the command line block exit for messages from clients. A blocked exit signals an access error.


.z.exit (action on exit)

Controlling evaluation, Debugging