X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fprocess.c;h=c3b493a61727219b1549aa07896b928d0551596f;hb=0a7e8462acb4861fe3fc2193319cec3552ea1c2f;hp=578b0c3e132ae0a74f32082a1a1d80765989b3e6;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git- diff --git a/src/process.c b/src/process.c index 578b0c3..c3b493a 100644 --- a/src/process.c +++ b/src/process.c @@ -46,7 +46,6 @@ Boston, MA 02111-1307, USA. */ #include "opaque.h" #include "process.h" #include "procimpl.h" -#include "sysdep.h" #include "window.h" #ifdef FILE_CODING #include "file-coding.h" @@ -100,13 +99,15 @@ static int update_tick; /* Nonzero means delete a process right away if it exits. */ int delete_exited_processes; -/* Hashtable which maps USIDs as returned by create_stream_pair_cb to +/* Hash table which maps USIDs as returned by create_stream_pair_cb to process objects. Processes are not GC-protected through this! */ -c_hashtable usid_to_process; +struct hash_table *usid_to_process; /* List of process objects. */ Lisp_Object Vprocess_list; +extern Lisp_Object Vlisp_EXEC_SUFFIXES; + static Lisp_Object @@ -114,18 +115,18 @@ mark_process (Lisp_Object obj, void (*markobj) (Lisp_Object)) { struct Lisp_Process *proc = XPROCESS (obj); MAYBE_PROCMETH (mark_process_data, (proc, markobj)); - ((markobj) (proc->name)); - ((markobj) (proc->command)); - ((markobj) (proc->filter)); - ((markobj) (proc->sentinel)); - ((markobj) (proc->buffer)); - ((markobj) (proc->mark)); - ((markobj) (proc->pid)); - ((markobj) (proc->pipe_instream)); - ((markobj) (proc->pipe_outstream)); + markobj (proc->name); + markobj (proc->command); + markobj (proc->filter); + markobj (proc->sentinel); + markobj (proc->buffer); + markobj (proc->mark); + markobj (proc->pid); + markobj (proc->pipe_instream); + markobj (proc->pipe_outstream); #ifdef FILE_CODING - ((markobj) (proc->coding_instream)); - ((markobj) (proc->coding_outstream)); + markobj (proc->coding_instream); + markobj (proc->coding_outstream); #endif return proc->status_symbol; } @@ -185,14 +186,14 @@ finalize_process (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("process", process, mark_process, print_process, finalize_process, - 0, 0, struct Lisp_Process); + 0, 0, 0, struct Lisp_Process); /************************************************************************/ /* basic process accessors */ /************************************************************************/ /* Under FILE_CODING, this function returns low-level streams, connected - directrly to the child process, rather than en/decoding FILE_CODING + directly to the child process, rather than en/decoding FILE_CODING streams */ void get_process_streams (struct Lisp_Process *p, @@ -357,7 +358,7 @@ get_process (Lisp_Object name) else { /* #### This was commented out. Although, simple - (kill-process 7 "qqq") resulted in a falat error. - kkm */ + (kill-process 7 "qqq") resulted in a fatal error. - kkm */ CHECK_PROCESS (obj); proc = obj; } @@ -416,7 +417,7 @@ make_process_internal (Lisp_Object name) Lisp_Object val, name1; int i; struct Lisp_Process *p = - alloc_lcrecord_type (struct Lisp_Process, lrecord_process); + alloc_lcrecord_type (struct Lisp_Process, &lrecord_process); /* If name is already in use, modify it until it is unused. */ name1 = name; @@ -592,8 +593,7 @@ INCODE and OUTCODE specify the coding-system objects used in input/output tem = Qnil; NGCPRO1 (tem); - locate_file (Vexec_path, program, EXEC_SUFFIXES, &tem, - X_OK); + locate_file (Vexec_path, program, Vlisp_EXEC_SUFFIXES, &tem, X_OK); if (NILP (tem)) report_file_error ("Searching for program", list1 (program)); program = Fexpand_file_name (tem, Qnil); @@ -643,8 +643,8 @@ INCODE and OUTCODE specify the coding-system objects used in input/output functions must then go to lisp and provide a suitable list for the generalized connection function. - Both UNIX ans Win32 support BSD sockets, and there are many extensions - availalble (Sockets 2 spec). + Both UNIX and Win32 support BSD sockets, and there are many extensions + available (Sockets 2 spec). A todo is define a consistent set of properties abstracting a network connection. -kkm @@ -897,7 +897,7 @@ read_process_output (Lisp_Object proc) old_zv += nchars; #if 0 - /* This screws up intial display of the window. jla */ + /* This screws up initial display of the window. jla */ /* Insert before markers in case we are inserting where the buffer's mark is, and the user's next command is Meta-y. */ @@ -1743,7 +1743,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. handle_signal (SIGUNUSED); #endif #ifdef SIGDANGER - handle_signal (SIGDANGER); + handle_signal (SIGDANGER); /* AIX */ #endif #ifdef SIGMSG handle_signal (SIGMSG); @@ -1946,7 +1946,11 @@ init_xemacs_process (void) MAYBE_PROCMETH (init_process, ()); Vprocess_list = Qnil; - usid_to_process = make_hashtable (32); + + if (usid_to_process) + clrhash (usid_to_process); + else + usid_to_process = make_hash_table (32); } #if 0 @@ -2054,11 +2058,11 @@ The value takes effect when `start-process' is called. Vprocess_connection_type = Qt; DEFVAR_BOOL ("windowed-process-io", &windowed_process_io /* -Enables input/ouptut on standard handles of a windowed process. +Enables input/output on standard handles of a windowed process. When this variable is nil (the default), XEmacs does not attempt to read standard output handle of a windowed process. Instead, the process is immediately marked as exited immediately upon successful launching. This is -done because normal windowed processes do not use stadnard I/O, as they are +done because normal windowed processes do not use standard I/O, as they are not connected to any console. When launching a specially crafted windowed process, which expects to be