What does the "_dirty" key mean?
Hello, When running: sudo launchctl print-disabled system on 10.11.3, I get: disabled services = { "_dirty" => true […] } What does that "_dirty" key mean? I’m asking, because I’m wondering if I did something wrong… TIA, Axel
Hey, Most likely an internal key to indicate that the list of disabled services has been modified and needs to be written to disk for persistent storage (see /var/db/com.apple.xpc.launchd/). It will go away once this is done (you can reboot to force that). I don't see any point of having this printed here, I guess the internal representation is just printed as it is. Regards, Thomas
On 03 Mar 2016, at 14:11, Axel Luttgens <axel.luttgens@skynet.be> wrote:
Hello,
When running:
sudo launchctl print-disabled system
on 10.11.3, I get:
disabled services = { "_dirty" => true […] }
What does that "_dirty" key mean?
I’m asking, because I’m wondering if I did something wrong…
TIA, Axel
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev
Le 3 mars 2016 à 14:41, Thomas Clement a écrit :
Hey,
Most likely an internal key to indicate that the list of disabled services has been modified and needs to be written to disk for persistent storage (see /var/db/com.apple.xpc.launchd/). It will go away once this is done (you can reboot to force that). I don’t see any point of having this printed here, I guess the internal representation is just printed as it is.
Hello Thomas, Yes, I had similar "intuitions", until I noticed that the "_dirty" key seems to persist across reboots. Axel
It's a hack; you can just ignore it. Better yet, file a Radar against launchd to not print that key in the output. -damien
On 3 Mar, 2016, at 05:11, Axel Luttgens <axel.luttgens@skynet.be> wrote:
Hello,
When running:
sudo launchctl print-disabled system
on 10.11.3, I get:
disabled services = { "_dirty" => true […] }
What does that "_dirty" key mean?
I’m asking, because I’m wondering if I did something wrong…
TIA, Axel
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev
(sorry, forgot to correctly fill the "To:" field)
Le 3 mars 2016 à 17:04, Damien Sorresso a écrit :
It’s a hack; you can just ignore it.
Hello Damien, Kind of relief, thus. ;-) Just out of curiosity, could you explain a little further what kind of "hack" it is about?
Better yet, file a Radar against launchd to not print that key in the output.
Done (#24972777). Thanks for your follow-up, Axel
Hey Axel, launchd periodically synchronizes the disabled dictionary to disk, and it will only actually do that if the "_dirty" key is set in that dictionary. Once written, the key is removed. -damien
On 4 Mar, 2016, at 04:22, Axel Luttgens <axel.luttgens@skynet.be> wrote:
(sorry, forgot to correctly fill the "To:" field)
Le 3 mars 2016 à 17:04, Damien Sorresso a écrit :
It’s a hack; you can just ignore it.
Hello Damien,
Kind of relief, thus. ;-)
Just out of curiosity, could you explain a little further what kind of "hack" it is about?
Better yet, file a Radar against launchd to not print that key in the output.
Done (#24972777).
Thanks for your follow-up, Axel
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev
Le 7 mars 2016 à 17:46, Damien Sorresso a écrit :
Hey Axel,
launchd periodically synchronizes the disabled dictionary to disk, and it will only actually do that if the "_dirty" key is set in that dictionary. Once written, the key is removed. -damien
Hello Damien, Thanks for having kindly provided these details. I gave me some additional time to observe the "phenomenon" before replying. It seems that since I’ve noticed that "_dirty" key in the output of "launchctl print-disabled", I’m stuck with it: it persists no matter how long I wait or how often I reboot. I guess the disk store is the /var/db/com.apple.xpc.launchd/disabled.plist file? If yes, this is the current output of "plutil -p" applied to that file: { "com.apple.mtmfs" => 0 "com.example.myservice" => 0 "com.apple.ftpd" => 1 "com.apple.mrt" => 0 "com.apple.locate" => 0 "com.apple.rpmuxd" => 0 "com.openssh.sshd" => 0 "com.apple.usbmuxd" => 0 "org.ntp.ntpd" => 0 } while the output of "launchctl print-disabled system" currently is: disabled services = { "_dirty" => true "com.openssh.sshd" => false "com.example.myservice" => false "com.apple.rpmuxd" => false "com.apple.usbmuxd" => false "com.apple.ftpd" => true "com.apple.mrt" => false "com.apple.mtmfs" => false "com.apple.backupd-auto" => false "com.apple.locate" => false "org.ntp.ntpd" => false } One could thus infer from the above that the dirty state stems from "com.apple.backupd-auto". In which case this raises a subsidiary question: why would the enabled status of that backupd-auto service never be written to disk? Sincerely, Axel
Axel, My speculation would be that some other component of the system is twiddling the enabled/disabled state of that job somewhat regularly. That causes the database to "dirty" itself. Anyway I wouldn't worry too much about this. It's just an implementation detail leaking and shouldn't actually cause you any problems. -damien
On Mar 12, 2016, at 03:27, Axel Luttgens <axel.luttgens@skynet.be> wrote:
Le 7 mars 2016 à 17:46, Damien Sorresso a écrit :
Hey Axel,
launchd periodically synchronizes the disabled dictionary to disk, and it will only actually do that if the "_dirty" key is set in that dictionary. Once written, the key is removed. -damien
Hello Damien,
Thanks for having kindly provided these details.
I gave me some additional time to observe the "phenomenon" before replying.
It seems that since I’ve noticed that "_dirty" key in the output of "launchctl print-disabled", I’m stuck with it: it persists no matter how long I wait or how often I reboot.
I guess the disk store is the /var/db/com.apple.xpc.launchd/disabled.plist file?
If yes, this is the current output of "plutil -p" applied to that file:
{ "com.apple.mtmfs" => 0 "com.example.myservice" => 0 "com.apple.ftpd" => 1 "com.apple.mrt" => 0 "com.apple.locate" => 0 "com.apple.rpmuxd" => 0 "com.openssh.sshd" => 0 "com.apple.usbmuxd" => 0 "org.ntp.ntpd" => 0 }
while the output of "launchctl print-disabled system" currently is:
disabled services = { "_dirty" => true "com.openssh.sshd" => false "com.example.myservice" => false "com.apple.rpmuxd" => false "com.apple.usbmuxd" => false "com.apple.ftpd" => true "com.apple.mrt" => false "com.apple.mtmfs" => false "com.apple.backupd-auto" => false "com.apple.locate" => false "org.ntp.ntpd" => false }
One could thus infer from the above that the dirty state stems from "com.apple.backupd-auto".
In which case this raises a subsidiary question: why would the enabled status of that backupd-auto service never be written to disk?
Sincerely, Axel
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/launchd-dev
participants (3)
-
Axel Luttgens
-
Damien Sorresso
-
Thomas Clement