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

Pavel Tsekov savannah-bounces at gnu.org
Tue Aug 2 07:42:13 UTC 2005


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/




More information about the mc-devel mailing list