diff options
author | Cheer Xiao <xiaqqaix@gmail.com> | 2013-01-15 15:37:33 +0800 |
---|---|---|
committer | Cheer Xiao <xiaqqaix@gmail.com> | 2013-01-17 14:58:53 +0800 |
commit | 6f35792c74612f4b754125a5cfe9c96baa7854b9 (patch) | |
tree | ee721ca7ce434f77e80722eb208e0466e17b5a28 /parser.cpp | |
parent | f1b375b042ad1564d00645579a54bb28ba3e30d1 (diff) |
Split out io_fd_t
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1607,13 +1607,11 @@ void parser_t::parse_job_argument_list(process_t *p, { wchar_t *end; - new_io.reset(new io_data_t(IO_FD, fd)); errno = 0; - new_io->param1.old_fd = fish_wcstoi(target.c_str(), &end, 10); + int old_fd = fish_wcstoi(target.c_str(), &end, 10); - if ((new_io->param1.old_fd < 0) || - errno || *end) + if (old_fd < 0 || errno || *end) { error(SYNTAX_ERROR, tok_get_pos(tok), @@ -1622,6 +1620,10 @@ void parser_t::parse_job_argument_list(process_t *p, tok_next(tok); } + else + { + new_io.reset(new io_fd_t(fd, old_fd)); + } } break; } |