aboutsummaryrefslogtreecommitdiff
path: root/butl/process
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-21 15:15:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-21 15:15:18 +0200
commita345a24df9e40e0ba2bf1b35a5a98420b4cc255d (patch)
tree074d6c58fc87d7630baf6919b14ebbac371c4ed5 /butl/process
parentb5ea2b682f8e0c3b8cd0f6692f4991f15d35ddd7 (diff)
Make process_path effective path always absolute
Diffstat (limited to 'butl/process')
-rw-r--r--butl/process16
1 files changed, 8 insertions, 8 deletions
diff --git a/butl/process b/butl/process
index e98e367..ff22577 100644
--- a/butl/process
+++ b/butl/process
@@ -50,21 +50,21 @@ namespace butl
// directory and if found then that's what should end up in child's argv[0].
// So this is the recall path. It is called recall because this is what the
// caller of the parent process will be able to execute if you printed the
- // command line. Finally, effective is the actual path to the executable
- // that will include the directory part if found in PATH, the .exe extension
- // if one is missing, etc.
+ // command line (provided you haven't changed the CWD). Finally, effective
+ // is the absolute path to the executable that will include the directory
+ // part if found in PATH, the .exe extension if one is missing, etc.
//
// As an example, let's say we run foo\foo.exe that itself spawns bar which
// is found as foo\bar.exe. The paths will then be:
//
// initial: bar
// recall: foo\bar
- // effective: foo\bar.exe
+ // effective: c:\...\foo\bar.exe
//
- // In most cases, at least on POSIX, all three paths will be the same. As an
- // optimization, if the recall path is empty, then it means it is the same
- // as initial. Similarly, if the effective path is empty then, it is the
- // same as recall (and if that is empty, as initial).
+ // In most cases, at least on POSIX, the first two paths will be the same.
+ // As an optimization, if the recall path is empty, then it means it is the
+ // same as initial. Similarly, if the effective path is empty then, it is
+ // the same as recall (and if that is empty, as initial).
//
// Note that the call to path_search() below adjust args[0] to point to the
// recall path which brings up lifetime issues. To address this this class