Skip to content

Commit

Permalink
Add unimplemented uncache (#11)
Browse files Browse the repository at this point in the history
Same as Apple's launchctl
  • Loading branch information
asdfugil authored Aug 12, 2024
1 parent 5e8330e commit 7528bdc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
1. [x] bootout
1. [x] enable
1. [x] disable
1. [x] uncache
1. [x] kickstart
1. [x] attach
1. [ ] debug
Expand Down
7 changes: 7 additions & 0 deletions launchctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ static const struct {
{ "bootout", "Tears down a domain or removes a service from a domain.", "<domain-target> [service-path1, service-path2, ...] | <service-target>", bootout_cmd },
{ "enable", "Enables an existing service.", "<service-target>", enable_cmd },
{ "disable", "Disables an existing service.", "<service-target>", enable_cmd },
{ "uncache", "Removes the specified service name from the service cache.", "<service-name>", uncache_cmd },
{ "kickstart", "Forces an existing service to start.", "[-k] [-p] <service-target>", kickstart_cmd },
{ "attach", "Attach the system's debugger to a service.", "[-k] [-s] [-x] <service-target>", attach_cmd },
{ "debug", "Configures the next invocation of a service for debugging.", "<service-target> [--program <program-path>] [--start-suspended] [oc-stack-logging] [--malloc-nano-allocator] [--debug-libraries] [--NSZombie] [--32] [--stdin [path]] [--stdout [path]] [--stderr [path]] [--environment VARIABLE0=value0 VARIABLE1=value1 ...] -- [argv0 argv1 ...]", todo_cmd },
Expand Down Expand Up @@ -219,6 +220,12 @@ submit_cmd(xpc_object_t *msg, int argc, char **argv, char **envp, char **apple)
return EDEPRECATED;
}

int
uncache_cmd(xpc_object_t *msg, int argc, char **argv, char **envp, char **apple)
{
return E2BIMPL;
}

int
todo_cmd(xpc_object_t *msg, int argc, char **argv, char **envp, char **apple)
{
Expand Down
1 change: 1 addition & 0 deletions launchctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ typedef int cmd_main(xpc_object_t *, int, char **, char **, char **);
cmd_main help_cmd;
cmd_main config_cmd;
cmd_main submit_cmd;
cmd_main uncache_cmd;
cmd_main todo_cmd; // Placeholder

// version.c
Expand Down

0 comments on commit 7528bdc

Please sign in to comment.