>>>>> "Louai" == Louai Al-Khanji <lo...@astranis.com> writes:
> On Wed, Nov 1, 2023 at 11:53 PM Louai Al-Khanji <lo...@astranis.com> wrote: >> >> Hi, >> >> I am interested in implementing the -o|--output option that the NIT: It is -O, not -o. > +#if ENABLE_FEATURE_START_STOP_DAEMON_FANCY > + if (opt & OPT_OUTPUT) { > + int output_fd = xopen(output, O_CREAT | O_WRONLY); > + original_stdout = xdup(STDOUT_FILENO); > + original_stderr = xdup(STDERR_FILENO); > + xdup2(output_fd, STDOUT_FILENO); > + xdup2(output_fd, STDERR_FILENO); > + } -O is documented to only work with the -b, so wouldn't it make more sense to add this logic around bb_daemon_helper() instead, then you also don't have to clean it up again? -- Bye, Peter Korsgaard _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox