trainger.blogg.se

Macos midnight commander
Macos midnight commander










The trick is to attach dtruss to another program, get dtruss to follow child processes as they are started (the -f flag), and have this other program wait until dtruss has attached before starting mc.

macos midnight commander

These could be solved by running dtruss in a different (root) terminal then attaching it to the mc process (running as a normal user), but attaching to a process requires knowing the PID and by the time dtruss is attached, mc would have finished starting up. The second problem is that the output of dtruss will be obscured by the ncurses interface of mc. The first problem is that dtruss, like all DTrace scripts, needs root privilege to run (and mc’s problem goes away when run as root). However using dtruss to debug interactive text-mode program problems is a bit tricky. Normally to debug program you would just run dtruss program and look at the output. dtruss itself is just a script using the powerful DTrace framework, but if dtruss does what you need it’s a lot easier to use than writing your own DTrace script. If you just want to fix this problem skip to the end, or read on for how I found the solution.Ī great tool for debugging all sorts of problems on Mac OS X is dtruss, which prints out details of the system calls a program makes. However on Mac OS X something has changed (I’m not sure exactly what) that results in mc 4.8.14 taking about 10 seconds to start. It’s widely available, is text based so works over SSH, it’s quite capable, and it’s very fast.

macos midnight commander

I sometimes use Midnight Commander (mc) as a file manager. Fixing slow startup of mc on Mac OS X using dtruss












Macos midnight commander