Pavel Roskin
b46fe283f6
Fix use of uninitialized pty_name.
2004-02-10 00:16:17 +00:00
Pavel Roskin
7eb0ef8bd2
* subshell.c: Use "rn" at the end of all error messages.
...
Don't use perror(). Make error messages more exact.
2004-02-10 00:11:09 +00:00
Pavel Roskin
24384e9a89
* panel.h: Fix duplication between cpanel and current_panel in
...
favor of current_panel. Ditto opanel and other_panel.
2003-10-26 06:45:59 +00:00
Pavel Roskin
17a04526cf
* subshell.c (pty_open_master) [HAVE_GRANTPT]: Prefer
...
posix_openpt() over GNU-specific getpt(). Needed for FreeBSD
5.x. Original patch by Max Khon <fjoe@FreeBSD.org>
2003-07-21 23:33:34 +00:00
Pavel Roskin
5b2bd08768
* configure.in: Remove test for SCO UNIX. Remove all references
...
to SCO_FLAVOR everywhere. SCO flavor is rather unsavory now.
2003-06-18 04:47:17 +00:00
Pavel Roskin
1fc1bdd0a4
* command.c (command_new): Fix memory leak.
...
* subshell.c (exit_subshell): Free pty_buffer.
2003-06-06 15:52:13 +00:00
Pavel Roskin
022fce89cb
* subshell.c: Remove dead code (SYNC_PTY_SIDES).
...
(init_subshell_child): Remove dead code (initfile for TCSH).
(init_subshell): Use ZSH_VERSION environment variable to detect
ZSH. Use -g option to zsh to hide entries beginning with space
from history. Add space before ZSH precmd to hide it.
2003-03-22 05:15:46 +00:00
Pavel Roskin
2915491aa0
Call check_sid() only if possible.
2003-03-05 20:23:50 +00:00
Pavel Roskin
861deaf09d
* subshell.c (init_subshell_child): Set environment variable
...
MC_SID to the session number of the subshell.
(check_sid): Check that we are not running mc already in the
same session.
* main.c (main): Don't run do_nc() if shutdown was requested.
2003-03-05 20:18:11 +00:00
Pavel Roskin
ff82223a35
Remove references to the archaic "linux" preprocessor definition.
...
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
8e7ad454d6
* subshell.c (resize_tty) [!TIOCSWINSZ]: Warning fix.
2003-01-24 21:00:49 +00:00
Pavel Roskin
107e1f0954
Partly revert last change - subshell_switch_key has to be char.
2002-12-24 03:05:09 +00:00
Pavel Roskin
5da0a2f08a
* subshell.c (subshell_switch_key): Make static const int.
2002-12-24 00:13:30 +00:00
Pavel Roskin
b246f3c7ea
s/Could not/Cannot/
2002-12-08 01:12:18 +00:00
Pavel Roskin
996886fcfd
Update includes.
2002-11-14 17:08:56 +00:00
Pavel Roskin
2c3b0c50b6
* subshell.c (subshell_name_quote): Don't quote numbers and
...
letters if possible and safe.
2002-10-31 04:01:19 +00:00
Pavel Roskin
d3f0a2f61b
Remove spaces around "Error" and "Warning" together with their translations.
...
Also remove spaces from "Quit" and "Search", but leave alone the
translations, that already have them without spaces.
2002-10-21 04:13:49 +00:00
Pavel Roskin
a3f9820755
* subshell.c (pty_open_master) [IS_AIX]: Open /dev/ptc, not
...
/dev/ptmx. From Sergey Pavlukhin <psi@dmng.ru>
2002-09-25 04:38:29 +00:00
Pavel Roskin
c785d4195b
* global.h: Move fcntl.h inclusion here. Define O_BINARY.
...
* mountlist.c: Remove more includes already handled in global.h.
2002-09-23 06:43:22 +00:00
Pavel Roskin
547567ae47
* subshell.c: Move tcsh_fifo to the file scope. Use mc_tmpdir()
...
to calculate tcsh_fifo.
2002-09-11 05:23:18 +00:00
Pavel Roskin
7d723361b2
* subshell.c (subshell_name_quote): Return NULL if we are out of
...
memory. Use "echo -e" with zsh (Debian bug #150996 ).
(do_subshell_chdir): Be prepared to get NULL from
subshell_name_quote().
2002-09-07 00:27:53 +00:00
Pavel Roskin
60f9328e8d
* key.c: Use the maximal file descriptor, not FD_SETSIZE in all
...
calls to select().
* subshell.c: Likewise.
2002-08-25 05:44:57 +00:00
Pavel Roskin
d1e02fba0f
* subshell.c (synchronize): Workaround for Cygwin (should not be
...
needed for the next version) - remove SIGCHLD blocking from
old_mask.
2002-08-19 22:28:00 +00:00
Pavel Roskin
11bd8d9c39
* subshell.c (synchronize): Discard all remaining data from
...
stdin to the subshell.
2002-08-19 02:06:01 +00:00
Pavel Roskin
105877896d
* subshell.c (exit_subshell) [AIX_TCSH_CODE_BELOW_IS_IT_FIXED]:
...
Remove. Nobody has fixed this code for years.
2002-08-19 01:54:34 +00:00
Pavel Roskin
f0dbdeb72e
* subshell.c (read_subshell_prompt): Remove argument "how", it's
...
never set to VISIBLY. Adjust all dependencies. Eliminate hack
with "clear_now" - it causes invalid memory access and hides the
real problem.
* util.c (strip_ctrl_codes): Fix possible invalid memory access
if the escape sequence ends unexpectedly.
2002-08-15 06:53:44 +00:00
Pavel Roskin
b7cdfa9c93
* main.c (sigchld_handler_no_subshell) [linux]: SIGTSTP is
...
always defined on Linux.
* subshell.c (sigchld_handler): No need to use SIGTSTP
explicitly when we really care about SIGCONT.
2002-08-09 23:36:06 +00:00
Pavel Roskin
e26cef8825
* subshell.c: Assume that SIGTSTP and SIGCONT are always
...
defined. This is now checked in configure. Otherwise
synchronize() would hang until subshell exits.
2002-08-04 06:59:34 +00:00
Pavel Roskin
e2a37d3809
* charsets.c: Unconditionally enable finalization code that was
...
only used with HAVE_MAD.
* color.c: Likewise.
* color.h: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* slint.c: Likewise.
* subshell.c (exit_subshell): Free subshell_prompt.
2002-08-01 20:31:52 +00:00
Pavel Roskin
2935c85c85
* subshell.c (feed_subshell): Reading 0 bytes in a channel with
...
FD_ISSET being set is a sign of something being wrong - exit
immediately. Observed when mc is run under su in xterm and
xterm is closed while the subshell is running.
Reported by Vlad Harchev <hvv@hippo.ru>
2002-07-30 00:03:26 +00:00
Pavel Roskin
073e17a8d0
* subshell.c: ioctl() doesn't set errno - don't use perror() to
...
report failures. Use fprintf() instead, ignore errors from
TIOCSWINSZ.
(resize_tty): New function - code common for resize_subshell()
and init_subshell_child().
2002-07-10 22:49:08 +00:00
Pavel Roskin
0c0a5ae270
* subshell.c (sigchld_handler): Remove subshell_pty from the
...
channel list if the subshell has died.
2002-07-03 16:35:42 +00:00
Pavel Roskin
2b7cf88d85
* global.h: Include unix.h under "classical" QNX.
...
* subshell.c: Don't include unix.h.
* utilunix.c: Likewise.
2002-02-18 21:54:27 +00:00
Pavel Roskin
b03032c29b
* main.c: Remove support for subshell debugging. Firstly, it
...
was broken. Secondly, every developer should be able to add
this code when needed. Finally, there is no need to expose the
option to the user and translate it into 30 languages.
* subshell.h: Remove debug_subshell.
* subshell.c: Likewise.
2001-11-12 22:09:40 +00:00
Pavel Roskin
13e92aca94
* layout.c: Use HAVE_TERMIOS_H and HAVE_SYS_IOCTL_H more
...
consistently.
* mouse.c: Likewise.
* subshell.c: Likewise.
* win.c: Likewise.
* util.c: Remove unused includes.
2001-09-11 02:18:02 +00:00
Pavel Roskin
a16f742216
* subshell.c: Move definitions of WEXITSTATUS and WIFEXITED
...
below all includes so that they can be defined elsewhere.
2001-09-08 05:36:23 +00:00
Pavel Roskin
c11389facb
* global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
...
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
a8ef641beb
* x.h: Remove. Adjust all users. Make sure that global.h is
...
included instead. Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
9466c031d8
* subshell.c: Use standard Autoconf symbols to determine whether
...
to include <stropts.h> and <grp.h>.
2001-08-24 04:51:11 +00:00
Pavel Roskin
7dbf6695ff
* subshell.c (feed_subshell): Don't wait forever after the first
...
select() call if fail_on_error is true. This alleviates hang
with zsh on QNX Neutrino.
2001-08-24 02:17:15 +00:00
Pavel Roskin
f0d3781bfb
* subshell.c (init_subshell): Run "set echo_style=both" at
...
startup to ensure that echo in tcsh understands octal numbers.
Reported by Francis Kwok <francis.kwok@alcatel.com>
2001-07-13 00:24:50 +00:00
Pavel Roskin
269737723a
* subshell.c (subshell_name_quote): New function. Quote all
...
characters as octals, use command substitution.
(do_subshell_chdir): Use subshell_name_quote(). Don't change
terminal settings when the quoted path is sent to the shell -
it's now safe.
2001-07-12 14:18:39 +00:00
Pavel Roskin
91f2348983
* main.c (sigchld_handler_no_subshell): Don't restart cons.saver
...
if it died.
* subshell.c (sigchld_handler): Likewise.
2001-07-06 17:29:20 +00:00
Pavel Roskin
5c56eb0c5a
* cons.handler.c: Reorganize includes. Fix warnings on BSD.
...
* rxvt.c (rxvt_extensions): Make static.
* main.c (sigchld_handler_no_subshell) [!__linux__]: Don't try
to restart cons.saver.
* subshell.c (sigchld_handler) [!__linux__]: Likewise.
2001-06-22 23:29:18 +00:00
Pavel Roskin
7b340a2af9
* achown.c: Make global variables static if possible. Remove now
...
useless preprocessor directives, since this file is now used in
the text edition only.
* boxes.c: Remove useless ifdefs.
[USE_VFS]: Don't undef USE_NETCODE - it's done in extraconf.h.
* cmd.c [USE_VFS]: Don't undef USE_NETCODE.
* chmod.c: Remove useless ifdefs.
* filegui.c: Likewise.
* hotlist.c: Likewise.
* info.c: Likewise.
* layout.c: Likewise.
* listmode.c: Likewise.
* option.c: Likewise.
* subshell.c: Likewise.
* help.c: Remove useless ifdefs. Make global variables static if
possible.
* key.c: Likewise.
* learn.c: Likewise.
2001-06-05 16:41:44 +00:00
Pavel Roskin
826a5594ac
* subshell.c (pty_open_master) [!HAVE_SCO && HAVE_GRANTPT]:
...
Don't try to close a file that wasn't opened.
2001-05-29 07:30:00 +00:00
Pavel Roskin
85e2dac3be
* subshell.c (pty_open_master) [HAVE_SCO]: Fix ambigous `else'.
...
[!HAVE_SCO && !HAVE_GRANTPT]: Likewise.
2001-05-17 16:53:35 +00:00
Pavel Roskin
d21f09608b
* subshell.c: Define _GNU_SOURCE to enable prototypes for
...
allocating pseudo-terminals on GNU systems.
2001-05-17 00:47:51 +00:00
Pavel Roskin
7f448a4c2e
* subshell.c (init_subshell_child): New function to initialize
...
child process and run subshell. Code moved from ...
(init_subshell): ... here.
2001-05-17 00:40:18 +00:00
Pavel Roskin
2d11201264
* subshell.c (init_subshell): Don't close pty_slave if is wasn't
...
open. Initialize it with -1.
2001-05-17 00:13:19 +00:00