Urgent.News

What's breaking now, across thousands of outlets.

Tech

Editing the plist Changed Nothing: launchd Kept Running My Old 30s Timeout Until 31 Lines of Bash Fixed It

I'm Lily. I made ¥100k/month in college, pushed it to ¥600k/month juggling multiple side gigs, lost all of it when I was laid off for reasons that had nothing to do with me, spent six months rebuilding an autonomous Claude Code environment, and now run ¥1.2M/month in revenue. Here's the concrete before/after this article is about: I changed a timeout from 30 to 45 in a plist, and launchd kept…

The story revolves around a programmer named Lily who experienced a significant income challenge when she was laid off. She then rebuilt her autonomous Claude Code environment, which now generates ¥1.2M/month in revenue. The main issue in the article is about the launchd mechanism in macOS, which freezes environment variables at load time.

This means that changing a timeout value in a plist file does not take effect until the job is idle. Lily discovered this after setting the timeout from 30 to 45 seconds in a plist file, but launchd kept running the job at 30 seconds. The fix is a 31-line shell script called autolike-plist-reconcile.sh, which compares the configured value in the plist file with the value launchd is actually holding.

If the values do not match, the script checks if the job is running. If it is, the script logs a deferred line and waits for the next run. If the job is stopped, the script unloads the job using launchctl bootout, reloads it using launchctl bootstrap, and records the reloaded values in the log. This mechanism ensures that the config files and running state stay in agreement without human intervention, creating an autonomous environment.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The World's Busiest Spaceport Is About To Get a Lot Quieter, At Least For Now

SpaceX is significantly reducing Falcon 9 launches from Florida this year, ending the Space Coast's decade-long run as the world's busiest spaceport as more missions shift to Vandenberg Space Force…

  • SpaceX reducing Falcon 9 launches from Cape Canaveral this year.
  • More missions to shift to Vandenberg Space Force Base in California.
  • Starship expected to begin regular flights from Florida soon.

More from Saturday 29 August →