Changes between Version 3 and Version 11 of Ticket #2086
- Timestamp:
- Nov 21, 2014, 12:05:27 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2086
- Property Cc added
- Property Summary Path detection failing → Path detection failing on BSDs
- Property Milestone Backlog → Alpha 18
-
Ticket #2086 – Description
v3 v11 1 Calling pyrogenesis (instead of some path (be it relative or absolute) without being in the right dir) fails with the following error on Linux andBSD.1 Calling pyrogenesis (instead of some path (be it relative or absolute) without being in the right dir) fails with the following error on ~~Linux and~~ BSD. 2 2 {{{ 3 3 $ pyrogenesis … … 30 30 However, if I'm in the same directory as the executable (e.g., with "cd /usr/local/bin && pyrogenesis"), it works perfectly. 31 31 32 This issue is twofold: 33 1. We don't use `INSTALLED_BINDIR` in [source:ps/trunk/source/ps/GameSetup/Paths.cpp#L156 Paths.cpp] `Paths::Root()` 34 2. We should get the proper path of the executable if we are started like above (some ways on how to do that for Linux and some BSD variants [http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937 at stackoverflow]) 32 We should get the proper path of the executable if we are started like above (some ways on how to do that for ~~Linux and~~ some BSD variants [http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937 at stackoverflow]) 35 33 sys_ExecutablePathname() in [source:ps/trunk/source/lib/sysdep/os/ source/lib/sysdep/os/]{linux/linux.cpp,bsd/bsd.cpp} 34 35 BSDs might not have procfs available (reusing the code in linux.cpp (move it to unix_executable_path.cpp (see r15996)) might be possible if they do, but we should not rely on that) so using sysctl is the way to go.