Commit graph

74 commits

Author SHA1 Message Date
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
ridiculousfish
31b7d076b7 Remove some dead variables.
Fix screwy output for invalid tilde expansion in expand.cpp
Some cleanup per clang static analyzer
2012-03-25 23:31:03 -07:00
ridiculousfish
44f3f51e0d Attempt to not fork just to output the result of simple builtins. I'm unsure of why this was necessary, if it ever was. 2012-03-09 11:49:29 -08:00
ridiculousfish
14a35e7c21 Flip the switch to stop draining threads before exec (!) 2012-03-09 11:28:24 -08:00
ridiculousfish
d173bb6e0a A bunch of changes working towards eliminating all memory allocation after fork() 2012-03-08 23:21:07 -08:00
ridiculousfish
ce859c9e92 Added some missing calls to setup_fork_guards() in utilities.
Made echo a builtin
2012-03-07 11:35:22 -08:00
ridiculousfish
68b93c624f Move special handling of DISPLAY environment variable from etc/config.fish to fish itself to reduce number of fork calls made at launch 2012-03-06 15:52:16 -08:00
ridiculousfish
36fe1e4a46 Some initial work towards cutting down the number of fork calls we do 2012-03-06 15:12:37 -08:00
ridiculousfish
d371256913 Fix for crash on "less test <tab>" 2012-03-04 18:11:21 -08:00
ridiculousfish
191221eec5 Final cleanup of io_data_t now that I recognize the bizarre way in which it shares output buffers (not sure how this ever worked before) 2012-03-04 02:35:30 -08:00
ridiculousfish
27f374a38b Some initial work on removing buffer_t from io_data_t 2012-03-03 23:56:35 -08:00
Peter Ammon
8b26d0104c Some initial changes to use CLO_EXEC, with an eye towards some day using it correctly. 2012-03-02 00:27:40 -08:00
ridiculousfish
8ada404c5f More work towards improving relationship between multithreading and fork 2012-02-29 16:14:51 -08:00
ridiculousfish
909d24cde6 More work on improving interaction between fork and pthreads. Added null_terminated_array_t class. 2012-02-29 16:14:51 -08:00
ridiculousfish
cf54ad8242 Change to wait for all outstanding iothreads before calling fork(). This should prevent a whole host of threading/fork interactions, but may also compromise performance...we'll see. 2012-02-27 19:46:15 -08:00
ridiculousfish
fdfa5c0602 Some initial work towards resolving nasty fork/pthread issues, and to having a per-parser job list 2012-02-27 18:43:24 -08:00
ridiculousfish
b30090f946 Some cleanup of completions in preparation for more multithreading 2012-02-26 13:27:31 -08:00
ridiculousfish
376e199ebb Removed a lot of string_buffer_t 2012-02-22 12:00:02 -08:00
ridiculousfish
62bd43f17f Large set of changes to migrate sb_out and sb_err to wcstring 2012-02-22 10:51:06 -08:00
ridiculousfish
5fe7c065dc Squash a bunch of leaks 2012-02-21 19:33:11 -08:00
Siteshwar Vashisht
74a7303c23 Modified functions in function.h/.cpp to use wcstring instead wchar_t*, other files also modified to use wcstring. 2012-02-19 22:55:15 +05:30
Siteshwar Vashisht
6e58c9f7c8 Switched to std::map instead of hash_table_t in env.cpp and env_universal_common.cpp. 2012-02-18 00:25:29 +05:30
Siteshwar Vashisht
18bb64cd43 Fixed compilation with recent changes on Linux. 2012-02-10 21:25:06 +05:30