experimental: allow on_stdout and on_stderr to be listrefs instead of coderefs