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
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
ridiculousfish
80e8f6a0d1
Removed halloc_wcsdup
2012-02-09 18:59:15 -08:00
ridiculousfish
e5ff5f7484
Some hopefully good changes to get IOs off of halloc
2012-02-09 18:43:36 -08:00
ridiculousfish
d3311c81e5
REmoved al_list from exec.cpp
2012-02-08 22:56:42 -08:00
ridiculousfish
5f686ebb47
Clean up exec_subshell, removing al_list from it
2012-02-07 23:35:41 -08:00
ridiculousfish
a0a43046b3
Removed discriminated union from block_t type, allowing us to store wcstrings in it
2012-02-07 17:36:54 -08:00
ridiculousfish
beece6a828
Clean up how argv is stored in process_t
2012-01-31 18:06:20 -08:00
ridiculousfish
3ad7de0fcb
Fix some leaks and clean up expand_pid to use wcstring
2012-01-30 11:15:06 -08:00
ridiculousfish
316f81119f
Excised some more halloc
2012-01-29 23:22:42 -08:00
ridiculousfish
8d016040ab
Back out removing a halloc_register to fix a leak
2012-01-29 22:32:01 -08:00
ridiculousfish
3b8a4e56b0
A bunch of work to move towards a sane memory model in job_t
2012-01-29 22:06:58 -08:00
ridiculousfish
8403aae928
Convert some cases where parsers are created to using PARSER_TYPE_GENERAL
2012-01-22 21:57:30 -08:00
ridiculousfish
da85bdc401
More work on the instanced parser
2012-01-22 20:47:13 -08:00
ridiculousfish
fa796d668f
Get some basic function signatures right for new instanced parser
2012-01-16 12:10:08 -08:00
ridiculousfish
0073a93079
Beginnings of instance parser work
2012-01-16 11:09:19 -08:00
ridiculousfish
c647bed9d5
Fix for bogus check for IFS environment variable
2012-01-16 09:43:34 -08:00
Peter Ammon
9b133a978d
Improve const and signed/unsigned correctness
2012-01-14 22:32:45 -08:00
Peter Ammon
a359f45df2
Redesign new environment variables to use env_var_t instead of wcstring
...
Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
2012-01-14 02:42:17 -08:00
ridiculousfish
8ba79d6ab9
Migrate function.cpp to STL types.
2012-01-13 23:54:49 -08:00
Siteshwar Vashisht
ee687ee433
Modified exec.cpp to use env_get_string(); rolled back changes to expand.cpp in last commit, because pressing ^D results into an error with the changes
2012-01-12 21:39:00 +05:30
Siteshwar Vashisht
9b56b67c0e
Revert "Modified expand.cpp and exec.cpp to use env_get_string()"
...
This reverts commit 48655e882e
.
2012-01-12 04:21:11 +05:30
Siteshwar Vashisht
48655e882e
Modified expand.cpp and exec.cpp to use env_get_string()
2012-01-12 04:19:04 +05:30
Siteshwar Vashisht
7f49d37a51
Modified exec.cpp to use env_get_string()
2012-01-12 04:01:08 +05:30
ridiculousfish
8d2f107d61
Some changes to migrate towards C++ and a multithreaded model
2011-12-26 19:18:46 -08:00
ridiculousfish
3f16ace678
Initial C++ conversion
2011-12-26 19:11:54 -08:00