This behaviour has been observed on stable/10 r279847 and on stable/9 r281350. Both systems are amd64 and use ZFS. In both cases, misc/mc was configured as: ===> The following configuration options are available for mc-4.8.14: DOCS=on: Build and/or install documentation EDITOR=on: Build with internal editor ICONV=on: Encoding conversion support via iconv NLS=off: Native Language Support SMB=off: SMB network protocol support SUBSHELL=on: Build with subshell support X11=off: X11 (graphics) support ====> Options available for the single SCREEN: you have to select exactly one of them SLANG=on: S-Lang console graphics library support NCURSES=off: Console (text) interface support ===> Use 'make config' to modify these settings
I can confirm I am seeing the same error on my system (built with the default port options). I'll look into it.
(In reply to Ben Woods from comment #1) Using absolute paths, such as /usr/local/sbin/lsof, produces the desired outcome. Maybe MC doesn't properly locate the executable when we only provide the name of the executable, lsof, similar to the example above.
Created attachment 155497 [details] Patch to misc/mc to use the PATH environment variable to search for the executable when running Filtered View
You are correct that mc does not use the PATH environment variable to search for the executable when performing a Filtered View command. The filtered view command is run with the mc_popen function in lib/utilunix.c. This function runs the process with the glib function g_spawn_async_with_pipes, which by default requires the full path of the executable. Details defined here: https://developer.gnome.org/glib/stable/glib-Spawning-Processes.html#g-spawn-async-with-pipes The attached patch adds the G_SPAWN_SEARCH_PATH to the g_spawn_async_with_pipes function call, which causes mc to use the PATH environment variable to search for the executable. This fixes/improves this behaviour.
Created attachment 155498 [details] Successful poudriere testport logs on FreeBSD 10.1 amd64
I have also submitted this patch upstream: https://github.com/MidnightCommander/mc/pull/59
(In reply to Ben Woods from comment #6) Goodie. I can confirm the patch works on stable/10 r281411. Thanks.
This patch has just been accepted upstream, however it looks like their next release is still some time away. Suggest we go ahead and add this patch to the port in the mean time.
A commit references this bug: Author: adamw Date: Mon Apr 27 12:19:47 UTC 2015 New revision: 384828 URL: https://svnweb.freebsd.org/changeset/ports/384828 Log: Fix "Cannot create pipe streams" when running shell commands using the Filtered View menu item on the File menu. PR: 199366 Reported by: Trond.Endrestol@ximalas.info Patch by: Ben Woods (maintainer) Changes: head/misc/mc/Makefile head/misc/mc/files/patch-lib_utilunix.c
Committed. For the next update, Ben, can you please remove the need to include <bsd.port.options.mk>?