Ticket #3141 (new defect)

Opened 11 years ago

"filtered view" can lock up mc

Reported by: ossi Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


the "filtered view" (alt-!) command is run through popen() with a blocking fread() loop (or equivalent). that means that if i enter a command that does not terminate (e.g., becuase i delete the file name, as i just did), mc will hang indefinitely, without any way to abort the command. the only way to recover is killing the command from the outside.

there are multiple approaches to fixing this:

  • run the filter through the subshell (see also #47). capturing the output may be a minor challenge (i guess one can simply append a redirection to a temp file to the command). but what if mc is compiled without subshell support?
  • enable the SIGINT handler for the time of running the filter
  • make the interaction with the subprocess more intelligent, so it can be properly interrupted via an mc dialog

the 1st approach would switch off the panels, while the 2nd and 3rd approach both require some kind of progress dialog.

Note: See TracTickets for help on using tickets.