summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-11-06 13:05:12 +0100
committerRobert Hensing <robert@roberthensing.nl>2021-11-06 13:46:51 +0100
commit2a4d433b1f194595c819cec88361a1e402ebadb8 (patch)
treef882b1233cfc476cbb5763c39033fa0f0c7c09f1 /nixos/doc/manual/development
parentac971cdc544955ac1d590182aeb25c4c8cacd46e (diff)
downloadnixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar.gz
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar.bz2
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar.lz
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar.xz
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.tar.zst
nixpkgs-2a4d433b1f194595c819cec88361a1e402ebadb8.zip
nixosTest: Add xclip as example of stdout blocker
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.section.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md
index a8c54aa6676..d9749d37da7 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/nixos/doc/manual/development/writing-nixos-tests.section.md
@@ -162,7 +162,9 @@ The following methods are available on machine objects:
     If the command detaches, it must close stdout, as `execute` will wait
     for this to consume all output reliably. This can be achieved by
     redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or
-    a file.
+    a file. Examples of detaching commands are `sleep 365d &`, where the
+    shell forks a new process that can write to stdout and `xclip -i`, where
+    the `xclip` command itself forks without closing stdout.
     Takes an optional parameter `check_return` that defaults to `True`.
     Setting this parameter to `False` will not check for the return code
     and return -1 instead. This can be used for commands that shut down
@@ -183,7 +185,8 @@ The following methods are available on machine objects:
 
     -   Dereferencing unset variables fail the command.
 
-    -   It will wait for stdout to be closed. See `execute`.
+    -   It will wait for stdout to be closed. See `execute` for the
+        implications.
 
 `fail`