On 24 Aug, 2015, at 21:52, Jerry Krinock <je...@ieee.org> wrote: >> On 2015 Aug 24, at 09:12, Damien Sorresso <dsorre...@apple.com> wrote: >> >> Disabling [removing] prevents the job from being loaded at all. So if the >> job exists in that disabled list, launchd will refuse to load it … > > That’s good, Damien, but is it OK to have 3000 “disabled” jobs? Given the > size of today’s hard drives, it could be argued that this is merely a > cosmetic issue, but since there is apparently no limit or frequency with > which agents can be created, one could easily have 10,000, 100,000 or > 1,000,000. Is there no way to “empty the trash”?
Disabled job entries are stored in a dictionary, so the fact that you have thousands of unique entries makes me think you've hit a pathological condition. In this case, launchd is honoring its contract. Someone previously disabled a job of a certain name, and the expectation is that future attempts to load a job of that name should fail. There's no garbage collection policy. If there was, someone other than you would very likely complain that the system is not behaving as advertised. -damien >> It's a switch in terminology, but not as radical a change as you might fear. >> A "service" in launchd refers to anything that is a daemon, agent, or XPC >> service, that is, anything launchd can load and manage. Daemons and agents >> are still things, as are XPC services. But in the new implementation >> (introduced in Yosemite), they are all represented by the same data >> structure and go through the same basic bootstrapping path. In prior >> implementations, they were treated substantially differently. > > That is very good, thank you. > >> If any of this was unclear in the documentation or can be made more clear, I >> encourage you to file bugs. These kinds of concepts are critical to >> developing a good mental model of how launchd operates, so good >> documentation is key. > > OK, I just spent a half hour reading the documentation and shall file > something. > > >> On 2015 Aug 23, at 18:43, Thomas <tclement...@free.fr> wrote: >> >> I don't think you can remove them. You should use the same job label to >> avoid having these many job entries or posix_spawn from your main agent >> instead or use an xpc service instead. > > I think you are correct, Thomas. But I’m still looking to confirm that in > the documentation! > _______________________________________________ > launchd-dev mailing list > launchd-dev@lists.macosforge.org > https://lists.macosforge.org/mailman/listinfo/launchd-dev
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev