Throughout change TTY_* to PTY_*, tty_* to pty_*, and ttym_* to ptmx_*.

* devices.cc: Regenerate.
* dtable.cc: (fh_alloc): Preserve /dev/tty name when that's what we opened.
(build_fh_pc): Preserve any existing name.
* fhandler.cc (fhandler_base::open_with_arch): Ditto.
* fhandler_tty.cc (fhandler_pty_master::fhandler_pty_master): Force the name to
/dev/ptmx while preserving other pty master device information.
* path.h (cfree_maybe): New macro.
(path_conv::operator =): Free any allocated strings in target.
(path_conv::free_strings): Delete unused function.
* sigproc.cc (proc_terminate): Remove previous accommodation for execed
processes since it didn't have the desired effect.  Change comment to a FIXME.
* spawn.cc (chExeced): Mark NO_COPY.
(exe_suffixes): Ditto.
This commit is contained in:
Christopher Faylor
2011-10-20 14:02:54 +00:00
parent aa982024d1
commit 38d732a152
14 changed files with 211 additions and 171 deletions

View File

@@ -33,13 +33,13 @@ enum fh_devices
FH_CONS = FHDEV (DEV_CONS_MAJOR, 0),
FH_CONS_MAX = FHDEV (DEV_CONS_MAJOR, MAX_CONSOLES),
DEV_TTYM_MAJOR = 128,
FH_TTYM = FHDEV (DEV_TTYM_MAJOR, 0),
FH_TTYM_MAX= FHDEV (DEV_TTYM_MAJOR, 255),
DEV_PTYM_MAJOR = 128,
FH_PTYM = FHDEV (DEV_PTYM_MAJOR, 0),
FH_PTYM_MAX= FHDEV (DEV_PTYM_MAJOR, 255),
DEV_TTYS_MAJOR = 136,
FH_TTYS = FHDEV (DEV_TTYS_MAJOR, 0), /* FIXME: Should separate ttys and ptys */
FH_TTYS_MAX= FHDEV (DEV_TTYS_MAJOR, 255), /* FIXME: Should separate ttys and ptys */
DEV_PTYS_MAJOR = 136,
FH_PTYS = FHDEV (DEV_PTYS_MAJOR, 0), /* FIXME: Should separate ttys and ptys */
FH_PTYS_MAX= FHDEV (DEV_PTYS_MAJOR, 255), /* FIXME: Should separate ttys and ptys */
DEV_SERIAL_MAJOR = 117,
FH_SERIAL = FHDEV (117, 0), /* /dev/ttyS? */
@@ -317,8 +317,8 @@ struct device
};
extern const device *console_dev;
extern const device *ttym_dev;
extern const device *ttys_dev;
extern const device *ptmx_dev;
extern const device *ptys_dev;
extern const device *urandom_dev;
extern const device dev_dgram_storage;
@@ -359,5 +359,5 @@ extern const device dev_fs_storage;
|| (((int) n) == FH_CONIN) \
|| (((int) n) == FH_CONOUT))
#define istty_slave_dev(n) (device::major (n) == DEV_TTYS_MAJOR)
#define istty_slave_dev(n) (device::major (n) == DEV_PTYS_MAJOR)
#endif /*_DEVICES_H*/