mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
man/sd_notify: fix indentation in sample programs
Whether we use a newline at the beginning of <programlisting> or not doesn't seem to have any effect. So let's use the newline in multi-line examples; it is easier to get the indentation right this way.
This commit is contained in:
@@ -436,10 +436,11 @@
|
||||
<para>A service could send the following after completing
|
||||
initialization:</para>
|
||||
|
||||
<programlisting>sd_notifyf(0, "READY=1\n"
|
||||
"STATUS=Processing requests…\n"
|
||||
"MAINPID=%lu",
|
||||
(unsigned long) getpid());</programlisting>
|
||||
<programlisting>
|
||||
sd_notifyf(0, "READY=1\n"
|
||||
"STATUS=Processing requests…\n"
|
||||
"MAINPID=%lu",
|
||||
(unsigned long) getpid());</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
@@ -447,10 +448,11 @@
|
||||
|
||||
<para>A service could send the following shortly before exiting, on failure:</para>
|
||||
|
||||
<programlisting>sd_notifyf(0, "STATUS=Failed to start up: %s\n"
|
||||
"ERRNO=%i",
|
||||
strerror_r(errnum, (char[1024]){}, 1024),
|
||||
errnum);</programlisting>
|
||||
<programlisting>
|
||||
sd_notifyf(0, "STATUS=Failed to start up: %s\n"
|
||||
"ERRNO=%i",
|
||||
strerror_r(errnum, (char[1024]){}, 1024),
|
||||
errnum);</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
@@ -473,9 +475,10 @@
|
||||
to synchronize against reception of all notifications sent before
|
||||
this call is made.</para>
|
||||
|
||||
<programlisting>sd_notify(0, "READY=1");
|
||||
/* set timeout to 5 seconds */
|
||||
sd_notify_barrier(0, 5 * 1000000);
|
||||
<programlisting>
|
||||
sd_notify(0, "READY=1");
|
||||
/* set timeout to 5 seconds */
|
||||
sd_notify_barrier(0, 5 * 1000000);
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
Reference in New Issue
Block a user