Stefan Monnier
66a9f7f460
* process.c (Fmake_network_process): Set :host to nil if it's not used.
...
Suggested by Masatake YAMATO <yamato@redhat.com>.
2010-05-24 16:46:41 -04:00
Dan Nicolaescu
ef03a4e61e
Remove POSIX_SIGNALS.
...
* s/usg5-4.h (POSIX_SIGNALS):
* s/netbsd.h (POSIX_SIGNALS):
* s/msdos.h (POSIX_SIGNALS):
* s/ms-w32.h (POSIX_SIGNALS):
* s/hpux11.h (POSIX_SIGNALS):
* s/gnu.h (POSIX_SIGNALS):
* s/gnu-linux.h (POSIX_SIGNALS):
* s/freebsd.h (POSIX_SIGNALS):
* s/darwin.h (POSIX_SIGNALS):
* s/cygwin.h (POSIX_SIGNALS):
* s/aix4-2.h (POSIX_SIGNALS): Remove definition.
* s/unixware.h:
* s/sol2-6.h: Remove comments on POSIX_SIGNALS.
* process.c (create_process):
* syssignal.h:
* sysdep.c (wait_for_termination, init_signals):
* process.c (create_process):
* msdos.c: POSIX_SIGNALS is always defined on all platforms,
remove all code that assumes the contrary.
2010-05-03 21:00:10 -07:00
Stefan Monnier
d2630aefd3
Don't burp if process sentinel/filter kills the current buffer.
...
* process.c (read_process_output, exec_sentinel): Don't burp if the
sentinel/filter kills the current buffer.
Fixes: debbugs:6060
2010-04-29 10:29:09 -04:00
Stefan Monnier
2b0a91e78f
Try to solve the problem of spurious EOF chars in long lines of text
...
sent to interactive subprocesses.
* sysdep.c (child_setup_tty): Do not enable ICANON any more.
(system_process_attributes): Remove unused var `ttotal'.
* process.c (send_process): Don't bother breaking long line with EOF
chars when talking to ttys any more.
(wait_reading_process_output): Output a warning when called in such
a way that it could block without being interruptible.
2010-04-12 22:07:48 -04:00
Stefan Monnier
01f5787b8a
* process.c (status_notify): Remove unused var `ro'.
2010-04-12 19:49:29 -04:00
Stefan Monnier
97e53006f6
* process.c (exec_sentinel): Preserve current-buffer.
2010-04-11 12:15:09 -04:00
Stefan Monnier
3a4fa2f208
(read_process_output): Move the save-current-buffer to
...
apply to both the filter and the non-filter branches.
2010-04-11 11:53:13 -04:00
Dan Nicolaescu
42a2c62292
Remove extern errno declarations.
...
* xterm.c:
* xrdb.c:
* w32term.c:
* unexec.c:
* unexaix.c:
* sysdep.c:
* process.c:
* lread.c:
* keyboard.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c (main):
* ecrt0.c:
* dispnew.c:
* callproc.c:
* buffer.c: Remove errno extern declarations.
* s/netbsd.h (NEED_ERRNO): Remove.
* movemail.c:
* etags.c:
* emacsclient.c: Remove extern errno declarations.
2010-04-01 20:10:33 -07:00
Dan Nicolaescu
1d29df5994
Clean up BSD_SYSTEM use.
...
* xterm.c:
* process.c:
* emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard
for including <sys/ioctl.h>.
* sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this
code is only used for MSDOS.
2010-03-31 13:39:03 -07:00
Chong Yidong
649dbf36cd
* process.c (Fmake_network_process): Don't apply Bug#5173 fix for Windows.
2010-03-26 20:45:32 -04:00
YAMAMOTO Mitsuharu
cad4261fd3
Don't call turn_on_atimers around `connect' (Bug#5723).
2010-03-25 17:56:15 +09:00
Helmut Eller
cd591dbccd
Call select' for interrupted connect' rather than creating new socket (Bug#5173).
2010-03-25 17:48:52 +09:00
Dan Nicolaescu
df7734b220
Remove dead code dealing with POSIX_SIGNALS.
...
* atimer.c (set_alarm): Remove dead code, all USG systems define
POSIX_SIGNALS.
* data.c (arith_error): Likewise.
* keyboard.c (input_available_signal, handle_user_signal)
(interrupt_signal): Likewise.
* process.c (sigchld_handler): Likewise.
(create_process): Remove if 0 code. Remove HPUX conditional when
!defined (POSIX_SIGNALS), it cannot be true.
* syssignal.h: Remove USG5_4 and USG conditionals when
!POSIX_SIGNALS, they cannot be true.
2010-03-22 12:51:59 -07:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Juanma Barranquero
96c834b62a
process.c: Fix typo in comment.
2009-12-29 01:51:07 +01:00
Stefan Monnier
84b318269c
(Fmake_network_process): Fix up the tests for
...
"connectionless socket", so they DTRT for seqpacket sockets as well.
2009-12-03 19:01:36 +00:00
Stefan Monnier
f00c449ba1
(Qseqpacket): New symbol.
...
(HAVE_SEQPACKET): New macro.
(Fmake_network_process): Accept new :type `seqpacket'.
(init_process): Add `seqpacket' feature when applicable.
(syms_of_process): Initialize Qseqpacket.
2009-12-03 18:51:32 +00:00
Jan Djärv
872870b29a
Use a select wrapper around the GLib event loop, thus taking into account GLib
...
timeouts and event sources. This simplifies Gtk+-code a lot, and is needed
for handling GConf death/restart.
* xterm.c: #include xgselect.h.
(x_initialize): Call xgselect_initialize.
* xsettings.c (something_changedCB): C++ comments => C comments.
(init_gconf): Do not deal with any GLib file descriptors, xg_select
does that now.
* gtkutil.c (xg_timer, xg_process_timeouts, xg_start_timer)
(xg_stop_timer, menu_grab_callback_cnt, menu_grab_callback)
(scroll_bar_button_cb): Remove.
(create_menus): C++ comments => C comments. Don't bind grab-notify
event.
(xg_create_scroll_bar): Don't bind button-press-event and
button-release-event.
* process.c: Include xgselect.h if defined (USE_GTK) ||
defined (HAVE_GCONF).
(wait_reading_process_output): Call xg_select for the same condition.
* xgselect.c (xg_select): New function to better integrate with
GLib/Gtk event handling. Needed if GConf daemon dies/restarts.
* xgselect.h: New file, declare xg_select, xgselect_initialize.
* Makefile.in (XOBJ): Add xgselect.o.
2009-11-21 15:28:59 +00:00
Andreas Schwab
62a6e103dd
* character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Remove
...
ignored second argument. All callers changed.
* regex.c (STRING_CHAR, STRING_CHAR_AND_LENGTH, RE_STRING_CHAR)
(RE_STRING_CHAR_AND_LENGTH): Likewise.
* xdisp.c (string_char_and_length): Likewise.
2009-11-21 11:52:23 +00:00
Dan Nicolaescu
9143355208
* process.c (ifflag_def): Make flag_sym constant.
...
(Fnetwork_interface_info): Use a constant pointer.
(ifflag_table):
* xfns.c (cursor_bits):
* xdisp.c (power_letter):
* termcap.c (speeds, esctab):
* sysdep.c (baud_convert):
* keyboard.c (lispy_accent_codes, modifier_names):
* image.c (xbm_format, xpm_format, pbm_format, png_format)
(jpeg_format, tiff_format, gif_format, svg_format)
(interlace_start, interlace_increment, gs_format):
* gtkutil.c (separator_names):
* fringe.c (swap_nibble):
* fns.c (base64_value_to_char, base64_char_to_value):
* fileio.c (make_temp_name_tbl):
* coding.c (suffixes): Make constant.
2009-11-11 20:11:51 +00:00
Jan Djärv
e90292a90c
Bug #4574 . Common code for file/font dialog. Handle timers with glib-timers.
...
* keyboard.h: Declare timer_check.
* keyboard.c (timer_check_2): New function that does what the old
timer_check did.
(timer_check): Call timer_check_2 until -1 or a non-zero time is
returned, i.e. don't return -1 with timers pending.
* process.c: Remove extern declaration of timer_check.
* xmenu.c (x_menu_wait_for_event): Remove code that did a timeout
even if timer_check returned -1.
* gtkutil.c (xg_dialog_response_cb): data is now a struct xg_dialog_data
(pop_down_dialog): Destroy widget (if any), cancel timer and unref
the event loop.
(xg_maybe_add_timer, xg_dialog_run): New functions (bug #4574 ).
(xg_get_file_name, xg_get_font_name): Call xg_dialog_run (bug #4574 ).
Destroy the dialog after xg_dialog_run.
2009-11-10 19:06:40 +00:00
Dan Nicolaescu
d67b4f80db
* xterm.c (syms_of_xterm):
...
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string. Use pure_cons instead of Fcons.
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Dan Nicolaescu
5e2327cf92
* process.c (socket_options): Make it const.
...
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
Dan Nicolaescu
019d2c4c58
* process.c (create_pty): Remove conditionals for no longer
...
supported systems: UNIPLUS and RTU.
2009-10-19 05:13:31 +00:00
Dan Nicolaescu
d7306fe6b1
* alloc.c: Do not define struct catchtag.
...
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.
* image.c: Move png.h #include earlier to avoid warnings.
* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h. (Bug#4643)
* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Adrian Robert
fa24b11499
(list_processes_1): Use long format in printf, and cast argument.
2009-10-13 01:03:46 +00:00
Nick Roberts
42371deb98
*** empty log message ***
2009-08-30 05:00:59 +00:00
Nick Roberts
a70d537146
(wait_reading_process_output): Keep the descriptor
...
when pty is used by a non-child process, e.g., in I/O buffer of
GDB this allows inferior to be restarted.
2009-08-30 04:54:34 +00:00
Kenichi Handa
550c8289fd
(send_process): Use encode_coding_object instead of
...
encode_coding_string to perform eol-conversion even if the string
is unibyte.
2009-08-27 11:13:33 +00:00
Chong Yidong
e42bdf0159
* process.c (status_notify): Don't perform redisplay.
...
(Fdelete_process, list_processes_1, process_send_signal):
Expliticly perform redisplay.
(wait_reading_process_output): Always check process status, but
don't perform redisplay unless DO_DISPLAY is non-zero (Bug#2930).
2009-08-17 21:04:05 +00:00
Eli Zaretskii
8b9fc63661
(create_pty): Fix last change.
2009-08-14 09:17:11 +00:00
Nick Roberts
850d0752fb
(create_pty): New function.
...
(Fstart_process): Use it to allow Emacs to just associate a pty
with the buffer. See associated change in gdb-mi.el.
(list_processes_1): Deal with no program name.
(start_process_unwind): Use pid == -2 to mean no process.
2009-08-13 13:22:55 +00:00
Juri Linkov
10be7e0dd9
(Fset_process_query_on_exit_flag): Mention killing
...
a buffer in docstring.
2009-07-18 21:07:12 +00:00
Andreas Schwab
347f3cd3dd
Simplify last change.
2009-06-28 20:25:49 +00:00
Andreas Schwab
b96075879a
(send_process): Keep decoded string in a local
...
variable and protect it from GC. (Bug#3521)
2009-06-28 20:12:20 +00:00
Ken Raeburn
4735b74e57
(status_message): Pass Faset index argument as a lisp object, so as to work
...
with USE_LISP_UNION_TYPE.
2009-06-20 23:23:55 +00:00
Kenichi Handa
66bd43d1d3
(status_message): Fix previous change. Be sure to
...
decode a localized string.
2009-06-15 13:21:14 +00:00
Chong Yidong
0bcbaaaaa8
* process.c (status_message): Fix handling of multibyte signal
...
string (Bug#3499).
2009-06-09 18:26:36 +00:00
Andreas Schwab
59c4c60fb1
(read_process_output): Make sure the current buffer is
...
always restored.
2009-05-02 11:54:43 +00:00
YAMAMOTO Mitsuharu
7e3386cbfd
(create_process): Clean up merger residues of 2008-07-17 change.
2009-04-29 05:15:47 +00:00
Andreas Schwab
77bf07e14e
* fns.c (Flocale_info): Protect vector from GC during decoding.
...
* process.c (Fstart_process): Protect argv strings from GC during
encoding.
2009-04-28 19:02:26 +00:00
Miles Bader
a20878b6d8
Rename system-process-attributes' to process-attributes'
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1553
2009-02-23 05:06:36 +00:00
Andreas Schwab
b5bfebec13
(send_process): Properly relocate pointer into data
...
when using encoded data.
2009-02-10 22:32:39 +00:00
Chong Yidong
c3eff1b099
(wait_reading_process_output): Use process_pending_signals.
2009-01-29 14:34:38 +00:00
Juanma Barranquero
fff4e45990
* dbusbind.c (Fdbus_register_signal):
...
* process.c (conv_sockaddr_to_lisp):
* w32fns.c (Fw32_battery_status): Use empty_unibyte_string.
2009-01-18 03:58:09 +00:00
Eli Zaretskii
6a1bab0e5c
(Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess)
...
(Qttname, Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime)
(Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs)
(Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime) [!subprocesses]: Define.
(syms_of_process) [!subprocesses]: Intern and staticpro them.
(Flist_system_processes, Fsystem_process_attributes) [!subprocesses]: Call
list_system_processes and system_process_attributes instead of returning Qnil.
2009-01-03 15:03:59 +00:00
Eli Zaretskii
89c874cfd7
(top level) <Qtime, Qctime>: New variables.
...
(syms_of_process): staticpro them.
(Fsystem_process_attributes): Add their documentation to the doc string.
2009-01-02 15:06:02 +00:00
Andreas Schwab
63136da6ca
(conv_sockaddr_to_lisp): Add workaround for
...
getsockname bug on BSD.
2009-01-01 15:58:38 +00:00
Dan Nicolaescu
900d51fcda
* process.c: (Flist_system_processes):
...
(Fsystem_process_attributes): Undo previous change, these functions
are duplicated for the benefit of #ifndef subprocesses.
2008-12-19 22:53:15 +00:00
Dan Nicolaescu
3d7de9fb39
* process.c: (Flist_system_processes):
...
(Fsystem_process_attributes): Fix strange CVS problem, return the
correct value.
2008-12-19 22:19:49 +00:00