aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge from emacs-24 branchChong Yidong2012-04-201-17/+26
|\
| * Fixes for pty handling in gdb-mi.el and process.c.Chong Yidong2012-04-201-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/gdb-mi.el (gdb): Revert 2012-04-19 change. (gdb-inferior-io--init-proc): New function. (gdb-init-1): Use it. (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty, responsible for allocating a new pty and hooking it to gdb when the old pty gets an EIO due to process exit. (gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers. (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area. (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset. * src/process.c (wait_reading_process_output): If EIO occurs on a pty, set the status to "failed" and ensure that sentinel is run. * doc/lispref/processes.texi (Asynchronous Processes): Mention nil argument to start-process.
| * More small doc and lispref edits related to processesGlenn Morris2012-04-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Serial Ports, Byte Packing, Bindat Spec) (Bindat Functions): Copyedits. * src/process.c (Fset_process_inherit_coding_system_flag) (Fset_process_query_on_exit_flag): Doc fix (mention return value). (Fmake_network_process, Fmake_serial_process): Doc fix. * admin/FOR-RELEASE: Related markup.
| * More process-related doc and manual small editsGlenn Morris2012-04-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Output from Processes, Filter Functions): Mention waiting-for-user-input-p. (Sentinels, Query Before Exit, System Processes, Transaction Queues): (Network Servers, Datagrams, Network Processes, Network Options) (Network Feature Testing, Serial Ports): Copyedits. (Network): Add encrypted network overview paragraph. Cross-reference the Emacs-GnuTLS manual. Use @acronym. * lisp/net/network-stream.el (open-network-stream): Doc fix. * src/process.c (Fset_process_inherit_coding_system_flag) (Fset_process_query_on_exit_flag): Doc fix (mention return value). (Fmake_network_process): Doc fix.
| * Merge 2012-04-09 GnuTLS fix from trunkChong Yidong2012-04-101-0/+3
| |
* | Merge from trunk; add Bug#.Paul Eggert2012-04-091-1/+4
|\ \
| * | Remove * characters from the front of variable docstrings.Chong Yidong2012-04-091-1/+1
| | |
| * | Limit number of GnuTLS handshakes per connection.Ted Zlatanov2012-04-091-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnutls.c (gnutls_log_function2i): Convenience log function. (emacs_gnutls_read): Use new log functions, `gnutls_handshakes_tried' process member, and `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake attempts per process (connection). * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add convenience `GNUTLS_LOG2i' macro. * process.c (make_process): * process.h: Add integer `gnutls_handshakes_tried' member to process struct.
* | configure: new option --enable-gcc-warningsPaul Eggert2012-04-091-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have been using this change for many months in my private copy of Emacs, and have used it to find several bugs. It's mature enough to publish now. * Makefile.in (GNULIB_MODULES): Add warnings, manywarnings. * configure.in: Support --enable-gcc-warnings, in the style of other GNU packages such as coreutils. (C_WARNINGS_SWITCH): Remove, replacing with... (WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable. (PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I, when including system files with GCC. * etc/NEWS: Mention --enable-gcc-warnings. * lib/Makefile.am (AM_CFLAGS): New macro. * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib. * lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (BASE_CFLAGS): Use new macros rather than old. * lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * src/Makefile.in (C_WARNINGS_SWITCH): Remove. (WARN_CFLAGS, WERROR_CFLAGS): New macros. (ALL_CFLAGS): Use new macros rather than old. * src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904. * src/regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore -Wunused-but-set-variable, -Wunused-function, -Wunused-macros, -Wunused-result, -Wunused-variable. This should go away once the Emacs and Gnulib regex code is merged. (xmalloc, xrealloc): Now static.
* * src/process.c (wait_reading_process_output): Handle pty disconnectTroels Nielsen2012-03-231-7/+12
| | | | | | by refraining from sending oneself a SIGCHLD. Fixes: debbugs:10933
* * process.c (read_process_output): Use p instead of XPROCESS (proc).Andreas Schwab2012-01-211-6/+4
| | | | (send_process): Likewise.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-12-291-1/+1
|
* * src/process.c (start_process_unwind): Treat any pid <= 0, except -2,Glenn Morris2011-12-061-2/+3
| | | | | | | as an error, not just -1. For example, make_process inits the pid to 0. Fixes: debbugs:10217
* Remove GCPRO-related macros that exist only to avoid shadowing locals.Paul Eggert2011-11-281-5/+5
| | | | | | | | | * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR) (GCPRO6_VAR, UNGCPRO_VAR): Remove. See <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. All uses changed to use GCPRO1 etc. (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO): Revert to old implementation (i.e., before 2011-03-11).
* Rename locals to avoid shadowing.Paul Eggert2011-11-251-14/+17
| | | | | | | | * fileio.c (Finsert_file_contents): Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing. * process.c (wait_reading_process_output): Rename inner 'proc' to 'p' to avoid shadowing. Indent for consistency with usual Emacs style.
* Spelling fixes.Paul Eggert2011-11-241-1/+1
|
* (wait_reading_process_output): Add comment and URL.Lars Magne Ingebrigtsen2011-11-211-1/+5
|
* Fix asynchrounous GnuTLS socket handling on some versions of the GnuTLS library.Lars Magne Ingebrigtsen2011-11-211-9/+33
| | | | | | Some versions of the GnuTLS library doesn't respons to poll reliably. Work around this by checking all GnuTLS sockets explicitly from the idle loop.
* Spelling fixes.Paul Eggert2011-11-191-1/+1
|
* Spelling fixes.Paul Eggert2011-11-171-1/+1
|
* Spelling fixes.Paul Eggert2011-11-141-2/+2
|
* Set members of the struct coding_system before accessing them ↵Kenichi Handa2011-11-071-0/+1
| | | | (bug#9910,9911,9912).
* Revert problematic change to wait_reading_process_output.Glenn Morris2011-10-281-9/+4
| | | | | * src/process.c (wait_reading_process_output): Revert 2009-08-30 change. Not clear what it was for, and it causes various bugs. (Bug#9839)
* More gnutls memory fixes.Chong Yidong2011-10-271-0/+1
| | | | | | | | | | | * src/gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is non-NULL, regardless of GNUTLS_INITSTAGE. (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal an error. Set process slots as soon as we allocate them. * src/gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros. * src/process.c (make_process): Set gnutls_state to NULL.
* Fix a memory leak in the built-in GnuTLS support.Chong Yidong2011-10-271-0/+7
| | | | | | | | | * src/gnutls.c (emacs_gnutls_deinit): New function. Deallocate credentials structures as well as calling gnutls_deinit. (Fgnutls_deinit, Fgnutls_boot): Use it. * src/process.c (make_process): Initialize GnuTLS credentials to NULL. (deactivate_process): Call emacs_gnutls_deinit.
* Whitespace changes.Juanma Barranquero2011-09-091-20/+20
|
* * process.c (make_process): Use printmax_t, not int, to formatPaul Eggert2011-08-291-3/+3
| | | | process-name gensyms.
* Merge from trunk.Paul Eggert2011-08-241-0/+3
|\
| * * lisp/mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signalsStefan Monnier2011-08-231-0/+3
| | | | | | | | | | | | | | | | | | from process filters aren't reliably transmitted to the surrounding accept-process-output. (mpc-proc-check): New function. (mpc-proc-sync): Use it Fixes: debbugs:8293
* | Merge from trunk.Paul Eggert2011-08-181-19/+17
|\ \ | |/
| * * src/process.c (Fnetwork_interface_list): Correctly determine bufferAndreas Schwab2011-08-181-22/+41
| | | | | | | | size.
* | Merge from trunk.Paul Eggert2011-08-141-1/+4
|\ \ | |/
| * Avoid crash with invalid default-process-coding-system.Kenichi Handa2011-08-141-1/+4
| | | | | | | | | | * src/process.c (create_process): Call setup_process_coding_systems after the pid of the process is set to -1.
| |
| \
*-. \ Merge from trunk.Paul Eggert2011-08-131-10/+83
|\ \ \ | | |/
| | * * process.c (Fnetwork_interface_info): Declare local only if needed.Paul Eggert2011-08-131-1/+2
| | |
| | * Fix network-interface-list|info on newer BSD derived OS:es.Jan Djärv2011-08-131-12/+82
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Add header check: sys/socket.h, ifaddrs.h, net/if_dl.h. Check for getifaddrs and freeifaddrs. Check for sa_len in struct ifreq.ifr_addr (Bug#8477). * src/process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477). (Fnetwork_interface_list): Allocate in increments of bytes instead of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct sockaddr. (struct ifflag_def): notrailers is smart on OSX. (Fnetwork_interface_info): Handle case when ifr_flags is negative. Get hardware address with getifaddrs if available.
* | Adjust in response to jan.h.d's comments.Paul Eggert2011-08-041-15/+3
| | | | | | | | See, for example <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#26>.
* | * process.c (Fnetwork_interface_list): Check for overflowPaul Eggert2011-07-281-0/+6
|/ | | | in size calculation.
* Use the same condition for POLL_FOR_INPUT in both keyboard.c and process.cLars Magne Ingebrigtsen2011-07-161-1/+1
| | | | Fixes: debbugs:1858
* Use pthread_sigmask, not sigprocmask.Paul Eggert2011-07-061-3/+3
| | | | | | | | * callproc.c (Fcall_process): * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask): * process.c (create_process): sigprocmask is portable only for single-threaded applications, and Emacs can be multi-threaded when it uses GTK.
* * process.c: Add defined (HAVE_GSETTINGS) for xgselect.hJan Djärv2011-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for xg_select. * xgselect.c: Add defined (HAVE_GSETTINGS). (xgselect_initialize): Ditto. * xsettings.c (store_monospaced_changed): Take new font as arg and check for change against current_mono_font. (EMACS_TYPE_SETTINGS): Remove this and related defines. (emacs_settings_constructor, emacs_settings_get_property) (emacs_settings_set_property, emacs_settings_class_init) (emacs_settings_init, gsettings_obj): Remove. (something_changedCB): New function for HAVE_GSETTINGS. (something_changedCB): HAVE_GCONF: Call store_monospaced_changed with value as argument. (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling g_settings_new. Do not create gsettings_obj. Remove calls to g_settings_bind. Connect something_changedCB to "changed". Fixes: debbugs:8967
* Fix handling of pending signals in wait_reading_process_output (Bug#8869).Chong Yidong2011-06-251-3/+9
| | | | | | * process.c (wait_reading_process_output): Bypass select if waiting for a cell while ignoring keyboard input, and input is pending. Suggested by Jan Djärv.
* Move DEFSYM to lisp.h and use everywhere.Juanma Barranquero2011-06-241-160/+83
|
* Merge from trunk.Paul Eggert2011-06-201-1/+2
|\
| * * src/process.c (Fset_process_buffer): Clarify return value in docstring.Deniz Dogan2011-06-201-1/+2
| |
* | * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.Paul Eggert2011-06-191-1/+1
|/ | | | We prefer signed integers, even for size calculations.
* Variadic C functions now count arguments with ptrdiff_t.Paul Eggert2011-06-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This partly undoes my 2011-03-30 change, which replaced int with size_t. Back then I didn't know that the Emacs coding style prefers signed int. Also, in the meantime I found a few more instances where arguments were being counted with int, which may truncate counts on 64-bit machines, or EMACS_INT, which may be unnecessarily wide. * lisp.h (struct Lisp_Subr.function.aMANY) (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Arg counts are now ptrdiff_t, not size_t. All variadic functions and their callers changed accordingly. (struct gcpro.nvars): Now size_t, not size_t. All uses changed. * bytecode.c (exec_byte_code): Check maxdepth for overflow, to avoid potential buffer overrun. Don't assume arg counts fit in 'int'. * callint.c (Fcall_interactively): Check arg count for overflow, to avoid potential buffer overrun. Use signed char, not 'int', for 'varies' array, so that we needn't bother to check its size calculation for overflow. * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args. * eval.c (apply_lambda): * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length. (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed. (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
* * buffer.c (Qclone_number): Remove for now, as it's unused.Paul Eggert2011-06-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (record_buffer, Funrecord_buffer): Rename local to avoid shadowing. (record_buffer): Remove unused local. * frame.c (other_visible_frames, frame_buffer_list): Now static. (set_frame_buffer_list): Remove; unused. * frame.h (other_visible_frames): Remove decl. * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF. * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls. (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only if HAVE_GPM. * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF. * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Define only if HAVE_GPM. * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static. (update_hints_inhibit): Remove; never set. All uses removed. * widgetprv.h (emacsFrameClassRec): Remove decl. * window.c (delete_deletable_window): Now returns void, since it wasn't returning anything. (compare_window_configurations): Remove unused locals. * xfns.c (x_set_scroll_bar_default_width): Remove unused locals. * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF. Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is implied by USE_GTK || USE_MOTIF. (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers the same widths as pointers. This follows up on the 2011-05-06 patch. * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID. * xterm.h: Likewise. (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
* [ChangeLog]Paul Eggert2011-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | Use 'inline', not 'INLINE'. * configure.in, autogen/config.in (INLINE): Remove. [lib-src/ChangeLog] Use 'inline', not 'INLINE'. * etags.c (hash): Now inline unconditionally. * make-docfile.c (put_char): inline, not INLINE. [nt/ChangeLog] Use 'inline', not 'INLINE'. * config.nt (INLINE): Remove. [src/ChangeLog] Use 'inline', not 'INLINE'. * alloc.c, fontset.c (INLINE): Remove. * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c: * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c: * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline. * gmalloc.c (register_heapinfo): Use inline unconditionally. * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.