Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stop Losing Work Mid-Job: Practical systemd-inhibit on Linux

You start a multi-hour rsync , walk away, and the laptop suspends halfway through. Or someone hits reboot while apt full-upgrade is unpacking. Or a headless box with IdleAction=suspend parks itself mid-backup because every session looked idle. Those are not application bugs. They are missing inhibitor locks . systemd-logind owns a small, deliberate API for this: applications (and operators) can…

When performing long-running tasks on Linux, such as rsync or backups, it's common for the system to unexpectedly suspend, shut down, or enter idle mode, interrupting the job. This issue arises when no inhibitor locks are in place to prevent these types of interruptions. Inhibitor locks are a feature of systemd-logind that allow applications and operators to temporarily block or delay sleep, shutdown, idle action, and even the handling of power/lid keys.

The command-line front end for managing these locks is systemd-inhibit. The protocol for these locks is detailed in the upstream Inhibitor Locks page and the org.freedesktop.login1(5) documentation.

This guide is aimed at operators and provides step-by-step instructions on listing active locks, wrapping real jobs to prevent interruptions, putting inhibitors on oneshot services, tuning logind.conf delay budgets, and knowing when not to take a blocking lock. It is important to understand that inhibitor locks do not replace backups, fencing, or package-manager locks; they simply prevent logind-mediated interruptions and allow the job to complete uninterrupted.

The mental model for using inhibitor locks involves a single D-Bus call: Inhibit(what, who, why, mode) → file descriptor. After executing the command, the lock is automatically removed when the file descriptor is closed, ensuring no stale locks are left in the database.

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

Write the Acceptance Tests Before the Agency Writes the Automation

If you are the technical person asked to "work with the agency", here is the one thing I would do before kickoff: write the acceptance tests yourself, in plain language, and attach them to the…

  • Write acceptance tests before agency writes automation.
  • Tests describe system response to specific real-world inputs.
  • Include unique identifier, condition, outcome, and human approval flag.

What I Had to Think About When Building a Product Launch Platform

Building a product launch platform sounds relatively straightforward. You need products. You need users. You need voting. You need a leaderboard. Done, right? Not quite.

  • LaunchStall platform tackles community rules and lifecycle complexities
  • Weekly edition system with predictable phases from Monday to Sunday
  • Free path offers LaunchStall badge, paid plans remove requirement

What a URL-Only Brand Audit Can Actually See: Build a Tiny Checker in Python

There are a lot of "free AI brand audit" tools now. Before trusting any of them, it helps to know what a tool can actually see when all you give it is a URL.

  • Tool cannot retrieve computed colours, mobile layout, or JavaScript-injected content.
  • Python script uses regex to identify CTA words, hype words, distinct CTA buttons, and Google fonts.

Photos, Voice Notes and PDFs: Handling WhatsApp Media in a CRM Pipeline

Text messages are the easy part of a WhatsApp-to-CRM integration. Real customers send photos of products, voice notes, screenshots of payments and PDFs of floor plans.

  • WhatsApp supports photos, voice notes, PDFs, and other media in CRM integration.
  • NxFlowAI's automation pattern handles media as independent asynchronous jobs.
  • Media links are added to CRM records for easy access without storing files.

More from Wednesday 7 October →