|
64 | 64 | other service, and thus shows up in the output of <command>systemctl list-units</command> like any other unit. It |
65 | 65 | will run in a clean and detached execution environment, with the service manager as its parent process. In this |
66 | 66 | mode, <command>systemd-run</command> will start the service asynchronously in the background and return after the |
67 | | - command has begun execution (unless <option>--no-block</option> or <option>--wait</option> are specified, see |
68 | | - below).</para> |
| 67 | + command has begun execution (unless <option>--no-block</option>, <option>--wait</option>, <option>--pipe</option>, |
| 68 | + or <option>--pty</option> are specified, see below).</para> |
69 | 69 |
|
70 | 70 | <para>If a command is run as transient scope unit, it will be executed by <command>systemd-run</command> |
71 | 71 | itself as parent process and will thus inherit the execution environment of the caller. However, the |
|
262 | 262 | to the terminal <command>systemd-run</command> is invoked on, via a pseudo TTY device. This allows running |
263 | 263 | programs that expect interactive user input/output as services, such as interactive command shells.</para> |
264 | 264 |
|
| 265 | + <para>This option will result in <command>systemd-run</command> synchronously waiting for |
| 266 | + the transient service to terminate, similar to specifying <option>--wait</option>. If specified |
| 267 | + along with <option>--wait</option>, <command>systemd-run</command> won't exit when manually disconnecting |
| 268 | + from the pseudo TTY device.</para> |
| 269 | + |
265 | 270 | <para>Note that |
266 | 271 | <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s |
267 | 272 | <command>shell</command> command is usually a better alternative for requesting a new, interactive login |
|
276 | 281 |
|
277 | 282 | <listitem><para>If specified, standard input, output, and error of the transient service are inherited from the |
278 | 283 | <command>systemd-run</command> command itself. This allows <command>systemd-run</command> |
279 | | - to be used within shell pipelines. |
280 | | - Note that this mode is not suitable for interactive command shells and similar, as the |
281 | | - service process will not become a TTY controller when invoked on a terminal. Use <option>--pty</option> instead |
282 | | - in that case.</para> |
| 284 | + to be used within shell pipelines.</para> |
| 285 | + |
| 286 | + <para>Note that this mode is not suitable for interactive command shells and similar, as the |
| 287 | + service process will not become a TTY controller when invoked on a terminal. Use <option>--pty</option> |
| 288 | + instead in that case.</para> |
283 | 289 |
|
284 | 290 | <para>When both <option>--pipe</option> and <option>--pty</option> are used in combination the more appropriate |
285 | 291 | option is automatically determined and used. Specifically, when invoked with standard input, output and error |
286 | 292 | connected to a TTY <option>--pty</option> is used, and otherwise <option>--pipe</option>.</para> |
287 | 293 |
|
| 294 | + <para>This option will result in <command>systemd-run</command> synchronously waiting for |
| 295 | + the transient service to terminate, similar to specifying <option>--wait</option>.</para> |
| 296 | + |
288 | 297 | <para>When this option is used the original file descriptors <command>systemd-run</command> receives are passed |
289 | 298 | to the service processes as-is. If the service runs with different privileges than |
290 | 299 | <command>systemd-run</command>, this means the service might not be able to re-open the passed file |
|
0 commit comments