Commit graph

96 commits

Author SHA1 Message Date
Jan Kanis
51a955c75c remove __warn_unused attribute from exec_subshell 2013-02-06 01:11:46 +01:00
ridiculousfish
ad8d68dd43 Make subcommands modify $status, and make builtin_set not modify status unless it fails
https://github.com/fish-shell/fish-shell/issues/547
https://github.com/fish-shell/fish-shell/issues/214
2013-01-31 15:57:08 -08:00
ridiculousfish
3f8baeba20 Attempt to further improve fish's handling when it runs out of fds, and plug some fd leaks 2013-01-30 03:08:06 -08:00
ridiculousfish
1879dc4b59 Initial set of changes working to make fish robust against running out of file descriptors 2013-01-30 02:22:38 -08:00
Cheer Xiao
8f045b9ec5 Fix spelling: s/circut/circuit/g 2013-01-24 19:20:06 +08:00
ridiculousfish
98a17f4046 Remove some functions which were rendered trivial by xiaq's changes. Make io_file_t take its path directly. Make io_buffer_t no longer use a shared_ptr for its data. 2013-01-19 10:59:43 -08:00
ridiculousfish
f850c021b7 Merge branch 'split-io' of git://github.com/xiaq/fish-shell into xiaq-split-io 2013-01-18 16:17:31 -08:00
Cheer Xiao
8600243683 Fix two clang warnings 2013-01-17 22:45:06 +08:00
Cheer Xiao
57ef5289fe Make is_input a member of io_pipe_t 2013-01-17 15:55:06 +08:00
Cheer Xiao
00b6431ad9 Split out io_pipe_t, let io_buffer_t inherit it 2013-01-17 15:55:05 +08:00
Cheer Xiao
e020ad0c06 Convert io_buffer_read to io_buffer_t::read 2013-01-17 15:55:05 +08:00
Cheer Xiao
9057801c4b Convert io_buffer_create to static io_buffer_t::create, make io_buffer_t constructor private 2013-01-17 15:55:05 +08:00
Cheer Xiao
0f443ef37b Convert io_buffer_destroy to ~io_buffer_t 2013-01-17 15:55:05 +08:00
Cheer Xiao
a20e0b9e2e Split out io_buffer_t, make input_redirect in exec() a raw pointer 2013-01-17 15:55:05 +08:00
Cheer Xiao
4b6bd7cae5 Split out io_file_t 2013-01-17 15:55:05 +08:00
Cheer Xiao
6f35792c74 Split out io_fd_t 2013-01-17 14:58:53 +08:00
ridiculousfish
9d6c4fa678 Make do_builtin_io multi-fork safe, moved it to postfork.cpp
Addresses https://github.com/fish-shell/fish-shell/issues/495
2013-01-11 15:09:53 -08:00
Cheer Xiao
b66233de78 Revert "Revert shared_ptr<io_data_t> changes until kinks are ironed out"
This reverts commit 77f1b1f0fe.
2013-01-11 14:18:10 -08:00
Cheer Xiao
ff49792f44 exec.cpp:exec: Don't remove block_io elements from j->io
When dulicate_prepend prepend copies of block_io elements to j->io, the
removing simply does nothing. Now that the same pointers are prepended to
j->io, don't remove them.
2013-01-11 14:18:10 -08:00
ridiculousfish
77f1b1f0fe Revert shared_ptr<io_data_t> changes until kinks are ironed out
https://github.com/fish-shell/fish-shell/pull/487

Revert "Merge branch 'oo-io' of git://github.com/xiaq/fish-shell into xiaq-oo-io"

This reverts commit f3c8f535a4, reversing
changes made to b02f6cf3bc.

Also reverts ac023f7588 and a79d3c680c
2013-01-04 02:05:30 -08:00
ridiculousfish
ac023f7588 Replace some shared_ptrs with const shared_ptr &. Don't use shared_ptr in postfork.cpp. Eliminate copy constructor in io_data_t. Simplify some other uses of shared_ptr<io_data_t> 2013-01-04 00:22:12 -08:00
Cheer Xiao
7f35f98d7d Use const shared_ptr<io_data_t>& instead of copying where appropriate. 2013-01-01 15:51:36 +08:00
Cheer Xiao
8b10b0a614 Convert all io_data_t copying to shared_ptr copying.
Copy constructor of io_data_t is removed.
2013-01-01 00:37:50 +08:00
Cheer Xiao
a9ada13a23 Use shared_ptr to manage io_data_t*. 2012-12-31 23:54:17 +08:00
Cheer Xiao
d6b5558cf2 Clean up initialization of pipe_{read,write} in exec() a bit. 2012-12-21 15:45:35 -08:00
ridiculousfish
50c04752f5 Make skip_fork a bool 2012-12-21 15:43:38 -08:00
ridiculousfish
2a91a7640c Make echo recognize -ne 2012-12-20 18:10:08 -08:00
ridiculousfish
ce15abd577 Rewrite str2wcstring to properly handle embedded nulls, and be simpler 2012-12-20 12:25:35 -08:00
ridiculousfish
d5af389d2e Simplify exec_subshell_internal 2012-12-19 16:40:10 -08:00
ridiculousfish
644607c29f Eliminate str2wcs 2012-12-19 13:31:06 -08:00
Cheer Xiao
09b1eee5d0 Random fixes to comments. 2012-12-16 12:23:24 +08:00
ridiculousfish
c5031c2b39 Output embedded null characters more often
https://github.com/fish-shell/fish-shell/issues/444
2012-12-12 15:44:01 -08:00
ridiculousfish
26678682ca Fix indentation of switch statements 2012-11-19 00:31:03 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
5e371e8fe7 Don't use posix_spawn for commands that need to be put into foreground to avoid a race
Fix for race where a command's output may not be fully drained
2012-11-04 15:45:52 -08:00
ridiculousfish
425afa63ce Don't use posix_spawn when file redirections are involved (except /dev/null) because the error handling is too difficult
Fix exec to correctly handle the case where a pid could not be created due to posix_spawn failing
Should fix https://github.com/fish-shell/fish-shell/issues/364
2012-10-29 01:45:51 -07:00
ridiculousfish
ff124465fd Clean up some warnings and some unused if-related code 2012-09-01 12:29:00 -07:00
ridiculousfish
96046ffd30 First stab at getting rid of the ugly state1, state2 properties of block_t 2012-08-26 22:42:29 -07:00
ridiculousfish
f5d4e3f94c Reintroduce IO transmorgrification (yuck) to fix problems with fish_config and complicated IO redirections 2012-08-22 13:41:21 -07:00
ridiculousfish
9145d05397 Restore correct order of IO redirections
Fixes https://github.com/fish-shell/fish-shell/issues/281
2012-08-19 14:09:39 -07:00
ridiculousfish
61686aff34 Adopt posix_spawn (!)
Rewrite IO chains to be a vector of pointers, instead of a linked list
Removed io_transmogrify
2012-08-15 00:57:56 -07:00
ridiculousfish
c67702a498 Cleaned up lots of typecasts, simplified some string handling 2012-08-04 15:11:43 -07:00
ridiculousfish
b08fb86637 Renamed env_vars to env_vars_snapshot_t
Cleanup of non-wcstring version of path_get_path
2012-07-20 20:39:31 -07:00
ridiculousfish
d06d6c6964 Various changes to reduce fish's compiled code size
OS X release build executable size dropped from 672k to 511k
2012-07-17 12:47:01 -07:00
ridiculousfish
86645b32e1 Work towards getting function.h off of shared_ptr 2012-05-17 19:38:08 -07:00
ridiculousfish
294fbc8309 Replaced some calls to unescape with unescape_string 2012-05-09 02:55:36 -07:00
ridiculousfish
fb2ed355ec Improve fork reporting
Save a couple of forks during init
2012-04-24 10:10:43 -07:00
ridiculousfish
0e3eb38f11 Improved fork reporting
Made autosuggestion work properly for tilde expansion
2012-04-21 20:08:44 -07:00
ridiculousfish
0bc644abf0 Fix lots of bugs related to the static analyzer
Improved how screen.cpp interacts with output_set_writer()
2012-03-26 01:21:10 -07:00