Commit graph

110 commits

Author SHA1 Message Date
liljencrantz
2160777d2f Implement non-clobbering file io. Use the >? operator for this for now.
darcs-hash:20071026184232-75c98-11edcbc7548c8ad3a2d4b648cb7ae18067569f02.gz
2007-10-27 04:42:32 +10:00
liljencrantz
e54ce9a147 Minor bug fix - the parse_util_set_argv function can trigger an event, hence signals have to be unblocked when it is called.
darcs-hash:20071015132006-75c98-4ec10e4e26ea63c86c57f7e1f24f3d0fc60995b5.gz
2007-10-15 23:20:06 +10:00
liljencrantz
36e08dc49e Make the maximum execve size test use sysconf. Create a fallback if sysconf is unavailable.
darcs-hash:20071015113936-75c98-078e9f8727e91d41fabc80827bf97c8e04dd97ba.gz
2007-10-15 21:39:36 +10:00
liljencrantz
dd02e96712 Second part of improved execve errors - this patch makes the memory limits nicely formated (e.g. 128kB instead of 136549 bytes).
darcs-hash:20071015095108-75c98-51c2ea6ab6edba5d1885eb5938f039054da775e2.gz
2007-10-15 19:51:08 +10:00
liljencrantz
4163040e56 First stab at better error reporting on too many arguments to execve.
darcs-hash:20071015093615-75c98-2137b887ca3c97bc3e4234e2fd14a1391b4cc85a.gz
2007-10-15 19:36:15 +10:00
liljencrantz
e55739296d Don't crash when trying to close fds for a builtin command
darcs-hash:20071005150106-75c98-292df3863252c1eebd5734a241a2d80e6883f65f.gz
2007-10-06 01:01:06 +10:00
liljencrantz
79ac330afb There code for detecting when a keepalive process was needed missed lots of cases. This should fix some issues. Both the keepalive code and the code for spawning fake processes for builtins should be rethought, though.
darcs-hash:20070924082144-75c98-ab62f758374952aa3b295af709d57931972f4683.gz
2007-09-24 18:21:44 +10:00
liljencrantz
e6764f3130 Improve commenting a bit
darcs-hash:20070924081823-75c98-20dee07adff34f2337c56b30f1e453cc38f40639.gz
2007-09-24 18:18:23 +10:00
liljencrantz
657e3f8147 Whitespace fixes, etc.
darcs-hash:20070922222041-75c98-5aeb13041abd7ca8f9989e209fbaa5441fa78756.gz
2007-09-23 08:20:41 +10:00
liljencrantz
1420744669 Fix rather large performance issue on systems with slow fork syscall - a fork was used whenever redirecting output to /dev/null and using a builtin, completely unneeded.
darcs-hash:20070921214955-75c98-b513df263751506e5e82f97eafa08041228bc8de.gz
2007-09-22 07:49:55 +10:00
liljencrantz
084c0c5f80 Correct minor typos, stupid error messages, indentation and drop unused variable.
darcs-hash:20070921140752-75c98-74318b9daffa071845187bcc0b72259ca37b7e18.gz
2007-09-22 00:07:52 +10:00
liljencrantz
151943f89e Indentation, typo and formating fixes. Very minor patch.
darcs-hash:20070908222453-75c98-2236d962f0c9016820063e871fbbeaa42f36ef22.gz
2007-09-09 08:24:53 +10:00
axel
d0585befb3 Make sure that io redirections are respected by the '.' builtin. This was not the case earlier, which caused various bugs, especially after eval was made into a function that internally used '.'
darcs-hash:20070425183002-ac50b-d7d93e3b74e7274fe3e0aad98e95dd608bb903ae.gz
2007-04-26 04:30:02 +10:00
axel
ee94424b0f Add the possibility for functions which do not shadow the arguments of the calling function
darcs-hash:20070422221033-ac50b-d9544c87d0ddab10f7f503b5a1707292f266efe4.gz
2007-04-23 08:10:33 +10:00
axel
c323fc226f Add support for changing token separator in command substitution. IT is not the first character of IFS, same as in various other shells
darcs-hash:20070422184956-ac50b-7e03b375feb9fd22e11aa7a7d8f8add8e3b717a5.gz
2007-04-23 04:49:56 +10:00
axel
4d6751c274 Allow named arguments to function instead of only $argv. Philip Ganchev once suggested this, and it was suggested again by Egil Möller.
darcs-hash:20070416200611-ac50b-5eb42c94a65a4e72cae12cd9c04424bdc3b2b4f8.gz
2007-04-17 06:06:11 +10:00
axel
e128fa1a8e Fix a bug where io redirection of builtins would not truncate files if the builtin did not produce any output
darcs-hash:20070324223430-ac50b-3f3d6fd35f5b82c59ecaa06b459fe2b61dc8f387.gz
2007-03-25 08:34:30 +10:00
axel
8176a1253b Do not use stdout to report errors when stderr is dead - take the hint instead...
darcs-hash:20070121152242-ac50b-3e192328959cf65f03756b3bfbb794fb43dccead.gz
2007-01-22 01:22:42 +10:00
axel
4f67c38777 Use constant instead of hardcoded value for sleeptime on failed fork call
darcs-hash:20070121152026-ac50b-1daaac921f31dd10b2646d51b65af5260890d291.gz
2007-01-22 01:20:26 +10:00
axel
86beb7b109 Minor code simplification in exec.c
darcs-hash:20070121151943-ac50b-d913d1b205443cdf40a83a1d001e4d7a114c6e0c.gz
2007-01-22 01:19:43 +10:00
axel
98a6c491b1 Print stack trace when execting due to fatal problem or bug
darcs-hash:20070121150341-ac50b-66b86014963568bf402a76d5beb7c1d4e188c5f7.gz
2007-01-22 01:03:41 +10:00
axel
66c045c439 Minor code edits. Add curly brackets in various places, add or rewrite various comments, fix indentation, etc.
darcs-hash:20070121150114-ac50b-4fd6965cb2c557178923f8afa944835166e08423.gz
2007-01-22 01:01:14 +10:00
axel
a1ec38f53b Check error code when writing output from builtins - try to report errors
darcs-hash:20070121145810-ac50b-46ecb601ce9f0d862f00e4a97f25b6034e52f4cc.gz
2007-01-22 00:58:10 +10:00
axel
0469d05447 Make it possible to buffer input to other file descriptors than stdin. It is still only possible to buffer input on a single descriptor to any given job.
darcs-hash:20070107141052-ac50b-561265cd5acde7d882e4506870f13d61d34b3734.gz
2007-01-08 00:10:52 +10:00
axel
2fcec27e23 Make sure errno is not changed when error reporting after a failed call to execve
darcs-hash:20070107140918-ac50b-35186f2300d6ec03dbeac2cb5d5ffcee3feffc4e.gz
2007-01-08 00:09:18 +10:00
axel
42d0283489 Fix bug in IO redirection making is possible for the IO redirections to fail in cases where there are multiple pipes and buffers using file descriptors above 2.
darcs-hash:20070107140646-ac50b-dee4f380320ef2743635e77401a789c28d45f805.gz
2007-01-08 00:06:46 +10:00
axel
edc20a7505 Update to the ':' patch by Nicholas Burlett. This patch makes sure that ':' style executing of a command is only performed if a regular call to execve fails. This should improve performance a mall bit in the common case.
darcs-hash:20061211190308-ac50b-d284fa30c8c633816898141b644bd3039f80cc62.gz
2006-12-12 05:03:08 +10:00
nickburlett
23759e6eca colon-command support
Shells such as bash, sh, tcsh, and ksh each support a "colon command" that causes the script to be
evaluated as a bourne script. In the case of bash and sh, this command is a no-op. For others,
it means the script has sh syntax.

To suppor this in fish, I've added code to launch_process that checks for a ':' as the first
character of p->actual_cmd. If it is a colon, the process descriptor is modified to call
/bin/sh, which should exist on any POSIX system.

darcs-hash:20061208220428-5830d-6bde4f1a3e8100296a60c21f9e47988e20688a77.gz
2006-12-09 08:04:28 +10:00
axel
1b71f91a01 Update documentation display code to run roff on the client system instead of pregenerating documentation and compiling it into program binaries
darcs-hash:20061117162438-ac50b-5c4c7f0bd8bf53a16e16ecfead9569e642b7160f.gz
2006-11-18 02:24:38 +10:00
axel
b139201a33 A few additional input checks, minor code simplifications, and some indentation/documentation fixes
darcs-hash:20061115133046-ac50b-a6145bd9a63b6667357cc3ec603e185696bf1951.gz
2006-11-15 23:30:46 +10:00
axel
946b5d1528 Remove getpgid prototype from exec.c - this prototype seems to be no longer missing
darcs-hash:20061115132959-ac50b-d163141db6ad824ea0f6788338ebcec5001cbf5b.gz
2006-11-15 23:29:59 +10:00
axel
d00bc973fe Use fcntl to automatically close fishd socken on exec instead of handling it manually
darcs-hash:20061115111857-ac50b-3e04a0bc16c8442bef02cf4a50777d4556b8eaa6.gz
2006-11-15 21:18:57 +10:00
axel
ec43090c16 Fix file descriptor leakage from completion pager
darcs-hash:20061112121613-ac50b-209d42c06401faf675ff123236823dcaa651d6f7.gz
2006-11-12 22:16:13 +10:00
axel
f83575f084 Make sure signals aren't blocked while autoloading, also add a few consistency checks to see that signals aren't blocked in critical places
darcs-hash:20061029210911-ac50b-50bec85c3d59d0332ba44f3ece1a012cdc3e8c4b.gz
2006-10-30 07:09:11 +10:00
axel
561ec7d5f5 Change the way the umask is used so that executable bits are ignored on file creation. Thanks to sqweek and Jamessan for explaining the issue.
darcs-hash:20061026151946-ac50b-3a55159343f1fe0a4edf3f077bcec8afd6f131f5.gz
2006-10-27 01:19:46 +10:00
axel
3a128e1484 Use bitset to implement flags for jobs instead of wasting a whole int for every flag
darcs-hash:20061025204759-ac50b-ea07caa30782a1ea02d2cd8aa7cbc94474047a10.gz
2006-10-26 06:47:59 +10:00
axel
4683f4c989 Fix a number of bugs found using the warnings generated by earlier patch
darcs-hash:20061019153603-ac50b-4efb1ad1fe2cbe693a921648a0616a3d258d7933.gz
2006-10-20 01:36:03 +10:00
axel
a074cd62bc Be more rigorous with the exit codes set by the parser and builtins
darcs-hash:20061009012102-ac50b-4f28c43dd1ccdcc04d1620a6da05218a99fd7337.gz
2006-10-09 11:21:02 +10:00
axel
00c25436d7 Make it possible to save a function when defining it using the -S switch
darcs-hash:20060908141241-ac50b-69a055a1e791e04e2b1208a5c36b9bb22c854c12.gz
2006-09-09 00:12:41 +10:00
axel
1c86395ed8 Fix bug reportad by Martin Bähr that causes fish fail when using blocks in pipelines in interactive mode.
darcs-hash:20060827005252-ac50b-09c98537b9de72f0d4a2e5a28490b2e38fe321c8.gz
2006-08-27 10:52:52 +10:00
axel
480a29594e Minor tweaks to previous fish_pager patch to fix two bugs
darcs-hash:20060822135815-ac50b-35d9f643385ec29f9d8f93ca83d01e060de93cc7.gz
2006-08-22 23:58:15 +10:00
axel
0a4819be27 Add support for buffering of input to a command, the first step to piping data to fish_pager instead of using the argument list
darcs-hash:20060813013803-ac50b-f8000d4c96162023411f84643f47221860b350b2.gz
2006-08-13 11:38:03 +10:00
axel
cd9102214b Rearrange includes so that config.h is always the first file to be included
darcs-hash:20060811011835-ac50b-847fc790288e3bb3f3a0ee7734ff278d2dc65bef.gz
2006-08-11 11:18:35 +10:00
axel
2700a9b697 Use the new array_list functions in exec.c
darcs-hash:20060731163548-ac50b-3b503e0457b33c6bb2eda0040a9fa7f15e6afe32.gz
2006-08-01 02:35:48 +10:00
axel
60f0533821 Include siginfo.h in all signal-using files to make Solaris happy. Thanks to Netocrat for the report and a description of the solution.
darcs-hash:20060730202659-ac50b-1840aff40ec2467242bd107676c7426cdb14f643.gz
2006-07-31 06:26:59 +10:00
axel
b2e2743195 Remove translate.c. The gettext fallback functionality is moved to fallback.c, the wide wrapper is moved to wutil.c
darcs-hash:20060719225549-ac50b-0a55e805b04f4fe0afa99ea580901d62f39cdef5.gz
2006-07-20 08:55:49 +10:00
axel
d56ab1d365 Switch from die_mem function to DIE_MEM macro in order to be able to give a line and file for the OOM message
darcs-hash:20060703103957-ac50b-8d7a860d931fd087f6d1759bc1e934dba1cfefe2.gz
2006-07-03 20:39:57 +10:00
axel
3ddd5e5981 Check exit status of close and fclose in a few extra places
darcs-hash:20060621095430-ac50b-52afcee91b856f706d6df6bcf2e3a6bc7d746e40.gz
2006-06-21 19:54:30 +10:00
axel
b016438c08 Update input validation. Always use the magic CHECK macro, which prints an error message including instructions on how to report this problem.
darcs-hash:20060621004836-ac50b-a47f296634eda0c469eb39034603015b1ad7ab5c.gz
2006-06-21 10:48:36 +10:00
axel
f7118e769f Add more function input validation checks
darcs-hash:20060608235212-ac50b-25fd55f96356af65d4da1eec100cc954b4a9f81e.gz
2006-06-09 09:52:12 +10:00