[bug #13984] -P option in wrapper script doesn't work



Follow-up Comment #4, bug #13984 (project mc):

This happens only when the subshell is used.

Anyway, I didn't know the answer so I had to look at the code. When the user
types 'exit' and the subshell is used MC receives SIGCHLD. The SIGCHLD handler
notices that the shell exits on user's request and sets the 'quit' flag in
subshell.c. This is noticed by the functions which call the subshell an
eventually 
quiet_quit_cmd() is called. quiet_quit_cmd() set the flag 'print_last_revert'
which invalidates the use of the -P switch.

I can only guess why it was done this way. A wild guess would be that it is
not clear which is the current directory at the time of the exit. This may not
be true though.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13984>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]