Bug 13937: (RM follow-up) Set working directory for daemon mode.
When running as a daemon under Net::Z3950::SimpleServer YAZ requires a little help to know where it's "working directory" is located so relative paths in config files may resolve correctly. This patch passes the working directory as prescribed on https://software.indexdata.com/yaz/doc/server.invocation.html such that the resolution of the cql2rpn filepath works as expected in tests. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
19fbc1cfa2
commit
82abbb29f9
|
|
@ -99,8 +99,11 @@ sub new {
|
|||
unshift @{ $self->{yaz_options} }, '-v', 'none,fatal';
|
||||
}
|
||||
|
||||
# Set main config for SRU support
|
||||
unshift @{ $self->{yaz_options} }, '-f', $self->{config_dir} . 'config.xml' if $self->{config_dir};
|
||||
# Set main config for SRU support and working directory
|
||||
if ( $self->{config_dir} ) {
|
||||
unshift @{ $self->{yaz_options} }, '-f', $self->{config_dir} . 'config.xml';
|
||||
unshift @{ $self->{yaz_options} }, '-w', $self->{config_dir};
|
||||
}
|
||||
|
||||
# Set num to prefetch if not passed
|
||||
$self->{num_to_prefetch} //= 20;
|
||||
|
|
|
|||
Loading…
Reference in New Issue