Mercurial > hg > xemacs-beta
comparison src/process.c @ 153:25f70ba0133c r20-3b3
Import from CVS: tag r20-3b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:38:25 +0200 |
parents | 538048ae2ab8 |
children | 43dd3413c7c7 |
comparison
equal
deleted
inserted
replaced
152:4c132ee2d62b | 153:25f70ba0133c |
---|---|
66 Lisp_Object Qopen, Qclosed; | 66 Lisp_Object Qopen, Qclosed; |
67 | 67 |
68 /* t means use pty, nil means use a pipe, | 68 /* t means use pty, nil means use a pipe, |
69 maybe other values to come. */ | 69 maybe other values to come. */ |
70 static Lisp_Object Vprocess_connection_type; | 70 static Lisp_Object Vprocess_connection_type; |
71 | |
72 #ifdef PROCESS_IO_BLOCKING | |
73 /* List of port numbers or port names to set a blocking I/O mode. | |
74 Nil means set a non-blocking I/O mode [default]. */ | |
75 static Lisp_Object network_stream_blocking_port_list; | |
76 #endif /* PROCESS_IO_BLOCKING */ | |
71 | 77 |
72 /* FSFmacs says: | 78 /* FSFmacs says: |
73 | 79 |
74 These next two vars are non-static since sysdep.c uses them in the | 80 These next two vars are non-static since sysdep.c uses them in the |
75 emulation of `select'. */ | 81 emulation of `select'. */ |
1494 buffer = Fget_buffer_create (buffer); | 1500 buffer = Fget_buffer_create (buffer); |
1495 proc = make_process_internal (name); | 1501 proc = make_process_internal (name); |
1496 | 1502 |
1497 descriptor_to_process[inch] = proc; | 1503 descriptor_to_process[inch] = proc; |
1498 | 1504 |
1505 #ifdef PROCESS_IO_BLOCKING | |
1506 { | |
1507 Lisp_Object tail; | |
1508 | |
1509 for (tail = network_stream_blocking_port_list; CONSP (tail); tail = XCDR (tail)) | |
1510 { | |
1511 Lisp_Object tail_port = XCAR (tail); | |
1512 int block_port; | |
1513 | |
1514 if (STRINGP (tail_port)) | |
1515 { | |
1516 struct servent *svc_info; | |
1517 CHECK_STRING (tail_port); | |
1518 svc_info = getservbyname ((char *) XSTRING_DATA (tail_port), "tcp"); | |
1519 if ((svc_info != 0) && (svc_info->s_port == port)) | |
1520 break; | |
1521 else | |
1522 continue; | |
1523 } | |
1524 else if ((INTP (tail_port)) && (htons ((unsigned short) XINT (tail_port)) == port)) | |
1525 break; | |
1526 } | |
1527 | |
1528 if (!CONSP (tail)) | |
1529 { | |
1530 #endif /* PROCESS_IO_BLOCKING */ | |
1499 set_descriptor_non_blocking (inch); | 1531 set_descriptor_non_blocking (inch); |
1532 #ifdef PROCESS_IO_BLOCKING | |
1533 } | |
1534 } | |
1535 #endif /* PROCESS_IO_BLOCKING */ | |
1500 | 1536 |
1501 XPROCESS (proc)->pid = Fcons (service, host); | 1537 XPROCESS (proc)->pid = Fcons (service, host); |
1502 XPROCESS (proc)->buffer = buffer; | 1538 XPROCESS (proc)->buffer = buffer; |
1503 init_process_fds (XPROCESS (proc), inch, outch); | 1539 init_process_fds (XPROCESS (proc), inch, outch); |
1504 XPROCESS (proc)->connected_via_filedesc_p = 0; | 1540 XPROCESS (proc)->connected_via_filedesc_p = 0; |
3392 The value has no effect if the system has no ptys or if all ptys are busy: | 3428 The value has no effect if the system has no ptys or if all ptys are busy: |
3393 then a pipe is used in any case. | 3429 then a pipe is used in any case. |
3394 The value takes effect when `start-process' is called. | 3430 The value takes effect when `start-process' is called. |
3395 */ ); | 3431 */ ); |
3396 Vprocess_connection_type = Qt; | 3432 Vprocess_connection_type = Qt; |
3433 | |
3434 #ifdef PROCESS_IO_BLOCKING | |
3435 DEFVAR_LISP ("network-stream-blocking-port-list", &network_stream_blocking_port_list /* | |
3436 List of port numbers or port names to set a blocking I/O mode with connection. | |
3437 Nil value means to set a default(non-blocking) I/O mode. | |
3438 The value takes effect when `open-network-stream-internal' is called. | |
3439 */ ); | |
3440 network_stream_blocking_port_list = Qnil; | |
3441 #endif /* PROCESS_IO_BLOCKING */ | |
3397 } | 3442 } |
3398 | 3443 |
3399 #endif /* not NO_SUBPROCESSES */ | 3444 #endif /* not NO_SUBPROCESSES */ |