]> git.tuebingen.mpg.de Git - dss.git/commit
Allow word-splitting for exit hook.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 15 Oct 2017 18:29:39 +0000 (20:29 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 7 Nov 2017 20:21:11 +0000 (21:21 +0100)
commit7277dbda6f036a3953d794305cad6a3bc51c67b4
tree93e61089196b1dc938a2e994c436ef5618ac1669
parentdead9f9151ae2cf14c45e87742284e165976e8c0
Allow word-splitting for exit hook.

All hooks except the exit hook are run via dss_exec_cmdline_pid(),
which performs word splitting to create the argument vector for
exec(2). For the exit hook, however, we build the argument vector
manually, so the command line for the exit hook is not split.

This commit removes this inconsistency. However, we can't use
dss_exec_cmdline_pid() here because we need to append the error string
which caused dss to exit to the argument vector as a single argument,
and this string may well contain whitespace characters.

Hence we run split_args() on the argument to --exit-hook to obtain
an argument vector, append the error string as another element,
and then run dss_exec().
dss.c