aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * src/process.c (server_accept_connection): Fix assertion (bug#80237).Eli Zaretskii2026-02-101-2/+6
|
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Simplify conv_sockaddr_to_lisp via strnlenPaul Eggert2025-12-071-7/+1
| | | | | * src/process.c (conv_sockaddr_to_lisp): Use strnlen rather than a circumlocution.
* Fix processing sub-process exit when keyboard input is pendingEli Zaretskii2025-11-151-0/+12
| | | | | | | * src/process.c (wait_reading_process_output): Process status changes of sub-processes when called with read_kbd zero and some "keyboard input" is available, but no output from any sub-process. (Bug#79777)
* Fix last changeEli Zaretskii2025-10-111-0/+4
| | | | | | | | | | At least on MS-Windows, the last change caused the process-tests/fd-setsize-no-crash/make-process test to hang. * src/process.c (wait_reading_process_output) [WINDOWSNT]: Do not stop monitoring the process descriptor when zero bytes are read. The EOF indication from subprocesses on MS-Windows is detected via an error condition (see w32.c), while zero-size reads are not to be taken as such. (Bug#79436)
* Stop monitoring fds after receiving EOFSpencer Baugh2025-10-111-1/+1
| | | | | | | | | | | | When a subprocess closes its stdout/stderr pipe, that causes pselect to always indicate that fd is readable, and read to always return with EOF on that fd. Therefore when we receive an EOF we need to stop monitoring the fd. Otherwise Emacs will spin at 100% CPU, repeatedly reading that same EOF off the fd. * src/process.c (wait_reading_process_output): When 'read_process_output' returns EOF indication, stop monitoring the descriptor. (Bug#79436)
* Allow creating a pipe process without a bufferSpencer Baugh2025-10-111-5/+11
| | | | | | | | | | | | | Previously, even passing :buffer nil to make-pipe-process would create a buffer. Now, if you explicitly call (make-pipe-process :buffer nil), it will create a pipe process without a buffer, just like all the other process creation functions. * src/process.c (Fmake_pipe_process): Check for explicit :buffer nil and don't make a buffer. (bug#79596) * doc/lispref/processes.texi (Asynchronous Processes): Update. * test/src/process-tests.el (process-test-make-pipe-process-no-buffer): Add test.
* Use up-to-date time in wait_reading_process_outputPaul Eggert2025-09-271-15/+6
| | | | | | | | | | | | | | | | | | | | | | In “Avoid duplicate calls to current_timespec” (2015-07-05) we started caching current_timespec results in NOW. However, this was buggy: we updated NOW only when the timeout was nonzero, but the timeout can be set temporarily to zero in several places in wait_reading_process_output (such as when checking for process status changes), which would cause us to never update NOW and therefore never detect that a timeout happened. Also, this caching was wrong even in principle: since we call Lisp code from wait_reading_process_output, substantial amounts of time can pass, and we can be left using an outdated NOW and incorrectly not time out. Also, nowadays we can use monotonic_coarse_timespec which is fast, and which is better anyway because it’s immune to manual clock changes. Co-authored-by: Spencer Baugh <sbaugh@janestreet.com> * src/process.c (wait_reading_process_output): Stop caching the current realtime. Instead, use the coarse monotonic clock without caching.
* Improve documentation of 'accept-process-output'Eli Zaretskii2025-09-201-2/+8
| | | | | | | | | * doc/lispref/processes.texi (Accepting Output): * src/process.c (Faccept_process_output): Document better the meaning of the timeout of 'accept-process-output' a,d the fact that it doesn't always return as soon as some output is available. See https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00750.html for more details.
* ; * src/process.c (deactivate_process): Fix last change.Eli Zaretskii2025-09-061-2/+5
|
* Avoid assertion violations when starting client network processEli Zaretskii2025-09-061-1/+5
| | | | | * src/process.c (deactivate_process): Clear the callback info of descriptors we are closing. (Bug#79367)
* Fix locking to threads of the client network processEli Zaretskii2025-09-051-0/+15
| | | | | | * src/process.c (server_accept_connection): Make the client process be locked to the same thread as the parent server process, or unlocked if the server process was unlocked. (Bug#79367)
* ; Fix formattingRobert Pluim2025-08-271-3/+3
| | | | | * src/process.c (clear_fd_callback_data, delete_write_fd, delete_keyboard_wait_descriptor): Space before paren.
* ; * src/process.c (set_proc_thread): Fix assertion.Eli Zaretskii2025-08-161-1/+2
|
* Make sure 'make-process' locks the process to the current threadEli Zaretskii2025-08-161-6/+15
| | | | | * src/process.c (set_proc_thread): New function. (Fset_process_thread, create_process): Use it.
* Zero fd_callback_info when deleting an fdSpencer Baugh2025-08-161-12/+12
| | | | | | | | | | | | | | .waiting_thread and .thread could be left set to non-NULL values in a deleted fd_callback_info entry. These would never be cleared by e.g. clear_waiting_thread_info since that only clears fd_callback_info entries up to max_desc. Clear fd_callback_info entirely when deleting an entry. * src/process.c (clear_fd_callback_data): Add. (delete_write_fd, delete_keyboard_wait_descriptor): Call clear_fd_callback_data. (bug#79201) (delete_read_fd): Remove duplicated clearing code. (deactivate_process): Remove duplicate recompute_max_desc.
* Set process-adaptive-read-buffering to nil by defaultStefan Kangas2025-02-101-1/+1
| | | | | * src/process.c (syms_of_process) <process-adaptive-read-buffering>: Set the default to nil. (Bug#75574)
* Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-41/+30
|\
| * Pure storage removal: Replace calls to removed functionsPip Cet2024-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (string_bytes, pin_string, valid_lisp_object_p) (process_mark_stack, survives_gc_p, syms_of_alloc): * src/androidterm.c (android_term_init): Replace call to 'build_pure_c_string'. * src/buffer.c (init_buffer_once, syms_of_buffer): * src/bytecode.c (exec_byte_code): * src/callint.c (syms_of_callint): * src/callproc.c (syms_of_callproc): * src/category.c (Fdefine_category): * src/coding.c (syms_of_coding): * src/comp.c (Fcomp__compile_ctxt_to_file0) (maybe_defer_native_compilation, syms_of_comp): * src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data): * src/dbusbind.c (syms_of_dbusbind): * src/doc.c (Fsnarf_documentation): * src/emacs-module.c (syms_of_module): * src/eval.c (Finternal__define_uninitialized_variable) (Fdefconst_1, define_error, syms_of_eval): * src/fileio.c (syms_of_fileio): * src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table): * src/fontset.c (syms_of_fontset): * src/frame.c (make_initial_frame): * src/haikufns.c (syms_of_haikufns): * src/intervals.c (create_root_interval): * src/keyboard.c (syms_of_keyboard): * src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent) (store_in_keymap, syms_of_keymap): * src/lisp.h: * src/lread.c (Fload, read0, intern_c_string_1, define_symbol) (Fintern, defsubr, syms_of_lread): * src/pdumper.c (Fdump_emacs_portable): * src/pgtkfns.c (syms_of_pgtkfns): * src/pgtkterm.c (syms_of_pgtkterm): * src/process.c (syms_of_process): * src/search.c (syms_of_search): * src/sqlite.c (syms_of_sqlite): * src/syntax.c (syms_of_syntax): * src/treesit.c (syms_of_treesit): * src/w32fns.c (syms_of_w32fns): * src/xdisp.c (syms_of_xdisp): * src/xfaces.c (syms_of_xfaces): * src/xfns.c (syms_of_xfns): * src/xftfont.c (syms_of_xftfont): * src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE', 'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list', 'pure_listn', etc., by impure equivalents.
| * Unexec removal: Main partPip Cet2024-12-121-39/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove unexec-specific parts. (EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC feature. (AC_ECHO): No longer display a line about the unexec feature. * lisp/loadup.el: * lisp/startup.el: Remove unexec-specific code. * src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'. * src/alloc.c (staticvec): Never initialize this variable. (BLOCK_ALIGN): Always allow large blocks. (mmap_lisp_allowed_p): Remove unexec-specific code. * src/buffer.c (init_buffer): * src/conf_post.h (ADDRESS_SANITIZER): * src/emacs.c (load_pdump, main): Remove unexec-specific code. (Fdump_emacs): Remove function. (syms_of_emacs): Remove 'Fdump_emacs'. * src/lastfile.c: Remove unexec-specific code. * src/lisp.h (gflags): Remove unexec-specific flags. (will_dump_p, will_bootstrap_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust predicates. (SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition. * src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning. * src/process.c (init_process_emacs): Remove !unexec condition * src/sysdep.c (maybe_disable_address_randomization): Adjust comment. (init_signals): * src/timefns.c (init_timefns): Remove unexec-specific code. * src/w32heap.c (report_temacs_memory_usage): Remove function. * src/w32heap.h: Adjust comment. * src/w32image.c (globals_of_w32image): Remove unexec-specific code.
* | Signal error when keyword/arg list is malformedRobert Pluim2025-01-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (syms_of_data): Add Qmalformed_keyword_arg_list error symbol. * src/process.c (Fmake_process, Fmake_pipe_process) (Fserial_process_configure, Fmake_serial_process) (Fmake_network_process): Signal Qmalformed_keyword_arg_list when the argument list length is odd. * src/sound.c (parse_sound): Also here.. * src/w32fns.c (Fw32_notification_notify): ..and here. (Bug#75584)
* | Replace call[1-8] with callnStefan Kangas2025-01-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of the 'calln' macro, the 'call1', 'call2', ..., 'call8' macros are just aliases for the former. This is slightly misleading and potentially unhelpful. The number of arguments N can also easily go out-of-synch with the used alias callN. There is no reason not to replace these aliases with using 'calln' directly. To reduce the risk for mistakes, the tool Coccinelle was used to make these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>. * src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c: * src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c: * src/chartab.c, src/cmds.c, src/coding.c, src/composite.c: * src/data.c, src/dbusbind.c, src/dired.c, src/doc.c: * src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c: * src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c: * src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c: * src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c: * src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c: * src/pgtkselect.c, src/print.c, src/process.c, src/sort.c: * src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c: * src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c: * src/xmenu.c, src/xselect.c, src/xterm.c: Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Merge from origin/emacs-30Eli Zaretskii2024-12-211-2/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f8da2d7854 ; * ChangeLog.4: Update. 49adcf30b01 ; * etc/AUTHORS: Update. 1381c6f9591 * Update authors.el 5c0f3f5826e ; * etc/NEWS: Mark unmarked entries. 8a0c9c234f1 Document 'trusted-content c6ce11b2a48 Mention network-interface-list in network-interface-info ... a7905145f70 ; * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Fi... cde22c02011 Move NEWS items from unreleased 28.3 to released 29.1 5686bb5b428 Improve browse-url-android-share docstring 92041e15f4a Minor doc fix for url-handler-regexp 9fd96e2ab95 Improve reb-change-syntax docstring b9dc337ea74 * lisp/files.el (trusted-content-p): Make `:all` work in ... 4b685bc4fcd ; * src/process.c (Fnetwork_interface_list): Fix typo. c14c4895719 ; * lisp/net/nsm.el (nsm-trust-local-network): Fix typo. 10f976300d0 ; Add some tree-sitter thing content to the manual 55303a6bc0a * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info... 8b6c6cffd1f trusted-content: Adjust the last patch based on prelimina... 69b16e5c638 ; * etc/NEWS: Fix typos. 5c6dbc65f36 ; * doc/lispref/frames.texi (Multiple Terminals): Add ind... 856a58e2827 Update documentation of 'etags' regexps some more 4c68846223b Update documentation of 'etags' regexps b5158bd1914 elisp-mode.el: Disable Flymake byte-compile backend in un... # Conflicts: # doc/man/etags.1 # etc/NEWS # lisp/org/ox-texinfo.el
| * | Mention network-interface-list in network-interface-info docstringRobert Pluim2024-12-181-1/+2
| | | | | | | | | | | | | | | * src/process.c (Fnetwork_interface_info): Reference 'network-interface-list'.
| * | ; * src/process.c (Fnetwork_interface_list): Fix typo.Robert Pluim2024-12-161-1/+1
| | |
* | | Fix network test failure when using VPN clientRobert Pluim2024-12-191-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using certain VPN clients, the interface info returned by 'getifaddrs' does not have the address family filled in for the ifa_netmask component (this is allowed by the standard, since the value is not specified). The resulting address info causes network tests suite failures. Fix by copying the address family from the returned interface address. * src/process.c (network_interface_list): Copy the interface address sa_family to the netmask address. (Fnetwork_lookup_address_info): Fix test for non-IP addresses to properly account for IPv6. * test/src/process-tests.el (process-tests-check-bug-74907): New test, checks that 'network-interface-list' output is as expected. (Bug#74907)
* | | Add support for TCP_NODELAY on network streamsEric Marsden2024-12-131-0/+5
| |/ |/| | | | | | | | | | | | | | | | | * src/process.c (socket_options): add entry for TCP_NODELAY. * lisp/emacs-lisp/bytecomp.el: add :nodelay to valid keywords for make-network-process compiler-macro. * doc/lispref/processes.texi: document :nodelay keyword argument to set-network-process-option and make-network-process. (Bug#74793)
* | Merge from origin/emacs-30Eli Zaretskii2024-09-211-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4b9a8fd6074 etags-regen-file-extensions: Add .pm 956f14ae5e9 * src/treesit.c (treesit_debug_print_parser_list): Fix co... 300d05ecb4c Type-check argument to network-lookup-address-info 0f0f21b7f27 ; Improve doc strings of options related to numbered backups f0daa2f2153 Conservative heuristic for tree-sitter parser ranges (bug... 035024b4e5a ; Fix treesit.c printing 8771310a10d ; * admin/notes/unicode: Need to run textsec-tests (bug#7... 4c6f45fa8ee Re-enable GC mark trace buffer by default c6077015894 ; * src/haiku_support.cc: Correct last change. ae22ad7f624 ; Add even more tests for previous commit 460b9d705ab Fix treesit_sync_visible_region's range fixup code (bug#7... 81347c1aaf2 ; * etc/PROBLEMS: Fix last change (bug#73207). a82b7f3e823 Document unavailability of frame geometry on Wayland
| * Type-check argument to network-lookup-address-infoRobert Pluim2024-09-191-0/+5
| | | | | | | | | | | | * src/process.c (Fnetwork_lookup_address_info): Check that the "name" argument is a string, and mention 'puny-encode-domain'. (Bug#73337)
* | Prefer static_assert to verifyStefan Kangas2024-08-221-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although static_assert is C11-specific, and Emacs remains on C99, it has been backported to older compilers by Gnulib. Gnulib has already changed to prefer static_assert, and we can do the same. * lib-src/asset-directory-tool.c (main_2): * src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc) (vectorlike_nbytes, allocate_pseudovector): * src/android.c (android_globalize_reference, android_set_dashes): * src/android.h: * src/androidfont.c (androidfont_draw, androidfont_text_extents): * src/androidvfs.c: * src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT, bidi_find_bracket_pairs): * src/buffer.c (init_buffer_once): * src/casefiddle.c (do_casify_multibyte_string): * src/dispnew.c (scrolling_window, scrolling): * src/editfns.c (styled_format): * src/emacs-module.c (module_extract_big_integer): * src/fileio.c (Fdo_auto_save): * src/fns.c (next_almost_prime, hash_string): * src/fringe.c (init_fringe): * src/keyboard.h (kbd_buffer_store_event_hold): * src/keymap.c: * src/lisp.h (memclear, reduce_emacs_uint_to_hash_hash, modiff_incr): * src/lread.c (skip_lazy_string): * src/pdumper.c (dump_bignum, Fdump_emacs_portable) (dump_do_dump_relocation, pdumper_load): * src/process.c (make_process, Fmake_process, connect_network_socket): * src/regex-emacs.c: * src/sort.c (tim_sort): * src/sysdep.c (init_random, SSIZE_MAX): * src/thread.c: * src/timefns.c (trillion_factor): * src/unexelf.c: * src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib verify. Remove import of verify.h, except when used for other reasons.
* | Merge from savannah/emacs-30Po Lu2024-07-291-9/+17
|\ \ | |/ | | | | | | 5cf64d8377a Fix sporadic crashes and `select' failures in dumped images a475360af98 Correct display of Doc View documents after tab switching
| * Fix sporadic crashes and `select' failures in dumped imagesPo Lu2024-07-291-9/+17
| | | | | | | | | | * src/process.c (init_process_emacs) [HAVE_UNEXEC]: Clear dumped values of child_signal_read_fd and child_signal_write_fd.
* | Make error messages adhere to our standardsStefan Kangas2024-07-161-2/+2
|/ | | | | | | | | | | | | | | | | | | | | * src/cygw32.c (chdir_to_default_directory): * src/fns.c (secure_hash): * src/keyboard.c (Finternal_handle_focus_in): * src/keymap.c (store_in_keymap): * src/pgtkfns.c (pgtk_set_scroll_bar_foreground) (pgtk_set_scroll_bar_background, Fx_export_frames) (Fpgtk_set_monitor_scale_factor, pgtk_get_defaults_value) (pgtk_set_defaults_value, Fpgtk_print_frames_dialog) (pgtk_get_monitor_scale_factor): * src/pgtkterm.c (pgtk_set_parent_frame): * src/process.c (network_interface_info, send_process): * src/w32.c (w32_read_registry): * src/w32fns.c (Fw32_read_registry): * src/window.c (Frecenter): * src/xfns.c (Fx_export_frames, Fx_print_frames_dialog) (x_set_mouse_color): Make 'error' message strings follow our guidelines. More specifically, they should not end in a period, and normally also be capitalized. See '(elisp) Programming Tips'.
* ; Update comments in a recent commitEli Zaretskii2024-06-141-0/+1
| | | | | | * src/process.c (read_and_insert_process_output): * src/insdel.c (insert_from_gap): * src/coding.h (struct coding_system): Improve comments (bug#71525).
* "Insert before markers" in read_and_insert_process_output properlyDmitry Gutov2024-06-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | * src/coding.c (setup_coding_system): Initialize it. (produce_chars, encode_coding, decode_coding_gap): Obey it in insert_from_gap calls. (encode_string_utf_8, decode_string_utf_8): Update the other calls to insert_from_gap to have one new argument (false). * src/coding.h: New field insert_before_markers. * src/decompress.c (Fzlib_decompress_region): Here too. * src/insdel.c (insert_from_gap): Accept new argument BEFORE_MARKERS (bug#71525) and pass it through to adjust_markers_for_insert. * src/lisp.h: Update prototype. * src/process.c (read_and_insert_process_output): Set process_coding->insert_before_markers instead of calling adjust_markers_for_insert.
* read_and_insert_process_output: Insert before markersDmitry Gutov2024-06-111-1/+4
| | | | | | | | | | * src/insdel.c (adjust_markers_for_insert): Make non-static. * src/lisp.h: Add declaration for it. * src/process.c (read_and_insert_process_output): Use it here. And also call insert_1_both with BEFORE_MARKERS=t, for compatibility with internal-default-process-filter (bug#66020).
* ; * src/process.c (read_and_dispose_of_process_output): Fix style.Eli Zaretskii2024-06-111-4/+3
|
* fast-read-process-output: Make saferDmitry Gutov2024-06-111-15/+20
| | | | | | | | | * src/process.c (read_process_output): Move the call to 'read_and_insert_process_output' from here. (read_and_dispose_of_process_output): To here (bug#66020). So that any Lisp code invoked through modification hook from the former function also benefit from safety guards like running_asynch_code, saved match data, inhibit_quot, etc.
* read_process_output_set_last_coding_system: Extract, reuseDmitry Gutov2024-06-111-39/+45
| | | | | | | | * src/process.c (read_process_output_set_last_coding_system): New function, extracted from read_and_dispose_of_process_output. (read_and_dispose_of_process_output): Update accordingly. (read_and_insert_process_output): Use it here instead of just transferring carryover (bug#66020, also mentioned in bug#71452).
* read_and_insert_process_output: Call 'prepare_to_modify_buffer' firstDmitry Gutov2024-06-111-0/+2
| | | | | * src/process.c (read_and_insert_process_output): Call 'prepare_to_modify_buffer' before any insertions (bug#71452).
* ; * src/process.c (syms_of_process): Fix ommission.Po Lu2024-06-111-1/+1
|
* ; * src/process.c (read_process_output): Check in missing hunk.Po Lu2024-06-101-1/+1
|
* Rename new variable in process.cPo Lu2024-06-101-2/+2
| | | | | * src/process.c (syms_of_process): Rename read_process_output_fast to fast_read_process_output.
* Unbreak build with Clang 15 on macOS 14.5Stefan Kangas2024-06-091-2/+2
| | | | | * src/process.c (read_process_output): Use EQ for comparison. (syms_of_process): Properly set a DEFVAR_BOOL to 'true' instead of 'Qt'.
* Fix a recent change in reading from sub-processesEli Zaretskii2024-06-091-2/+2
| | | | | * src/process.c (make_process): Move to here... (create_process): ...from here.
* ; Fix coding style of last changePo Lu2024-06-091-13/+13
| | | | | * src/process.c (read_and_insert_process_output) (read_and_dispose_of_process_output): Fix coding style.
* read-process-output-max: Increase the default valueDmitry Gutov2024-06-091-1/+1
| | | | | * src/process.c (read-process-output-max): Increase the default value to 65536 (bug#66020).
* Remember the value of read_process_output_max when process is createdDmitry Gutov2024-06-091-6/+5
| | | | | | | | * src/process.h (Lisp_Process): Add field readmax. * src/process.c (read_process_output): Use it. (create_process): Save the value of read_process_output_max to it when the process is created (bug#66020). Use for pipe size.
* Go around calling the default process filter (reducing GC churn)Dmitry Gutov2024-06-091-55/+143
| | | | | | | | | | | | | | | Instead of allocating strings and passing them to the filter, pass the char buffer to a C function implementing the same logic. * src/process.c (read_process_output_before_insert) (read_process_output_after_insert): New functions, extracted from internal-default-process-filter. (Finternal_default_process_filter): Use them. (read_and_insert_process_output): New function. Use them. (read_process_output_fast): New variable. (read_process_output): Use it to choose how to insert (bug#66020). * etc/NEWS: Mention the change.