Re: [PATCH v4 3/4] maintenance: use launchctl on macOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 17, 2020 at 4:13 PM Derrick Stolee via GitGitGadget
<gitgitgadget@xxxxxxxxx> wrote:
> +static int launchctl_boot_plist(int enable, const char *filename, const char *cmd)
> +{
> +       child.no_stderr = 1;
> +       child.no_stdout = 1;
> +       if (start_command(&child))
> +               die(_("failed to start launchctl"));

Did you have any thoughts on the observation I made in a followup
response[1] during review of v3 in which I suggested that we might be
able to avoid suppressing stderr (and stdout) here? In particular, the
idea was that if, in launchctl_schedule_plist(), we do a simple
existence check for the .plist file and only call
launchctl_boot_plist(0,...) to `bootout` the .plist file if it exists,
then we shouldn't need to muck with stderr/stdout suppression. The
benefit is that if `bootout` fails for some reason, then the user
would see the (hopefully) meaningful error message emitted `launchctl
bootout`.

The same .plist existence check could be done in
launchctl_remove_plist() before trying to `bootout` the file.

Anyhow, such refinement can be done later is desired, so not worth a
re-roll, but I was curious about your thoughts on the issue.

[1]: https://lore.kernel.org/git/CAPig+cTRJb-fn2R6rJO1hkeCc_ehVhkNufO4=LhtPQudVeonnA@xxxxxxxxxxxxxx/



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux