If the user edits result in an empty file (after stripping), we would silently not do anything, aborting the edit. This is rather confusing, let's emit a notice: $ build/systemctl --user edit asdf.service --full --stdin </dev/null /home/zbyszek/.config/systemd/user/asdf.service: after editing, new contents are empty, not writing file. (This also works with an editor, instead of --stdin. The message is printed on the console and is visible after the editor exits.) While at it, fix the condition to skip writing file after stripping. We had "old_contents", but we modified that string. In some code flows, we would compare the stripped old contents (i.e. a string which by defintion doesn't have a newline at the end) with a string to which we just appended a newline (i.e. a string which by defintion has a newline at the end).
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
