DGSH-READVAL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
AUTHOR

NAME

dgsh-readval − data store client

SYNOPSIS

dgsh-readval [−c | -e | -l] [−nq] [−x] −s path

DESCRIPTION

dgsh-readval is a data store client. By default it will communicate with the store specified through the path to a Unix domain socket, ask to read the last (final) record written to that store, and write the value on its standard output.

dgsh-readval is normally executed from within dgsh-generated scripts, rather than through end-user commands. This manual page serves mainly to document its operation and the flags that can be used in dgsh scripts when reading from stores.

OPTIONS

−c

Read the current (rather than the last) value from the store. If no complete record has been written into the store, the operation will block until such a record is available.

−e

Read the current or an empty value from the store. If no complete record has been written into the store, the operation will return an empty record, rather than block.

−l

Read the last value from the store. This is the default behavior of dgsh-readval. The operation will block until the store’s server (dgsh-writeval) determines that it has read the last record by detecting an end-of-file condition on its standard input.

−n

Do not retry a failed connection to the store. By default dgsh-readval will try to establish a connection to the store every one second. This behavior is designed to avoid failures due to race conditions between write stores that are started asynchronously (in the background) and subsequent read operations from them.

−q

Ask the write store (the corresponding dgsh-writeval process) to terminate its operation. No value is read.

−x

Do not participate in dgsh negotiation.

−s path

This mandatory option must be used to specify the path of the Unix-domain socket dgsh-readval will connect to communicate with the store. This is specified as a normal Unix file path, e.g. /tmp/myvalue.

SEE ALSO

dgsh(1), dgsh-writeval(1)

AUTHOR

Diomidis Spinellis — <http://www.spinellis.gr>