File 0993-kernel-Add-comment-about-why-os-cmd-uses-an-absulute.patch of Package erlang

From 6f3d427811a47cd01681021e0950105c3c403f56 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Thu, 8 Oct 2020 16:44:15 +0200
Subject: [PATCH] kernel: Add comment about why os:cmd uses an absulute path

---
 lib/kernel/src/os.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index 29a26674ba..b1488f1390 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -270,7 +270,11 @@ mk_cmd({win32,Wtype}, Cmd) ->
     mk_cmd(OsType, atom_to_list(Cmd));
 mk_cmd(_,Cmd) ->
     %% Have to send command in like this in order to make sh commands like
-    %% cd and ulimit available
+    %% cd and ulimit available.
+    %%
+    %% We use an absolute path here because we do not want the path to be
+    %% searched in case a stale NFS handle is somewhere in the path before
+    %% the sh command.
     {"/bin/sh -s unix:cmd", [out],
      %% We insert a new line after the command, in case the command
      %% contains a comment character.
-- 
2.26.2

openSUSE Build Service is sponsored by