Eliminate narrow_string_rep_t

This was used to cache a narrow string representation
of commands, so that if certain system calls returned errors
after fork, we could output error messages without allocating
memory. But in practice these errors are very uncommon, as are
commands that have wide characters. It is simpler to do a best-effort
output of the wide string, instead of caching a narrow string
unconditionally.
This commit is contained in:
ridiculousfish
2016-02-28 01:38:28 -08:00
parent 3633c51ad8
commit 9151ec7092
5 changed files with 32 additions and 62 deletions

View File

@@ -453,11 +453,7 @@ static void handle_child_status(pid_t pid, int status)
}
process_t::process_t() :
argv_array(),
argv0_narrow(),
type(),
internal_block_node(NODE_OFFSET_INVALID),
actual_cmd(),
pid(0),
pipe_write_fd(0),
pipe_read_fd(0),
@@ -480,8 +476,6 @@ process_t::~process_t()
}
job_t::job_t(job_id_t jobid, const io_chain_t &bio) :
command_str(),
command_narrow(),
block_io(bio),
first_process(NULL),
pgid(0),