comparison src/process.c @ 106398:31424b91531a

(Fmake_network_process): Fix up the tests for "connectionless socket", so they DTRT for seqpacket sockets as well.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 03 Dec 2009 19:01:36 +0000
parents 210af1fb2669
children 72ee8229ccc7
comparison
equal deleted inserted replaced
106397:210af1fb2669 106398:31424b91531a
3331 3331
3332 /* Make QCaddress an alias for :local (server) or :remote (client). */ 3332 /* Make QCaddress an alias for :local (server) or :remote (client). */
3333 QCaddress = is_server ? QClocal : QCremote; 3333 QCaddress = is_server ? QClocal : QCremote;
3334 3334
3335 /* :nowait BOOL */ 3335 /* :nowait BOOL */
3336 if (!is_server && socktype == SOCK_STREAM 3336 if (!is_server && socktype != SOCK_DGRAM
3337 && (tem = Fplist_get (contact, QCnowait), !NILP (tem))) 3337 && (tem = Fplist_get (contact, QCnowait), !NILP (tem)))
3338 { 3338 {
3339 #ifndef NON_BLOCKING_CONNECT 3339 #ifndef NON_BLOCKING_CONNECT
3340 error ("Non-blocking connect not supported"); 3340 error ("Non-blocking connect not supported");
3341 #else 3341 #else
3426 3426
3427 /* Slow down polling to every ten seconds. 3427 /* Slow down polling to every ten seconds.
3428 Some kernels have a bug which causes retrying connect to fail 3428 Some kernels have a bug which causes retrying connect to fail
3429 after a connect. Polling can interfere with gethostbyname too. */ 3429 after a connect. Polling can interfere with gethostbyname too. */
3430 #ifdef POLL_FOR_INPUT 3430 #ifdef POLL_FOR_INPUT
3431 if (socktype == SOCK_STREAM) 3431 if (socktype != SOCK_DGRAM)
3432 { 3432 {
3433 record_unwind_protect (unwind_stop_other_atimers, Qnil); 3433 record_unwind_protect (unwind_stop_other_atimers, Qnil);
3434 bind_polling_period (10); 3434 bind_polling_period (10);
3435 } 3435 }
3436 #endif 3436 #endif
3629 contact = Fplist_put (contact, QCservice, service); 3629 contact = Fplist_put (contact, QCservice, service);
3630 } 3630 }
3631 } 3631 }
3632 #endif 3632 #endif
3633 3633
3634 if (socktype == SOCK_STREAM && listen (s, backlog)) 3634 if (socktype != SOCK_DGRAM && listen (s, backlog))
3635 report_file_error ("Cannot listen on server socket", Qnil); 3635 report_file_error ("Cannot listen on server socket", Qnil);
3636 3636
3637 break; 3637 break;
3638 } 3638 }
3639 3639
3792 if ((tem = Fplist_get (contact, QCstop), !NILP (tem))) 3792 if ((tem = Fplist_get (contact, QCstop), !NILP (tem)))
3793 p->command = Qt; 3793 p->command = Qt;
3794 p->pid = 0; 3794 p->pid = 0;
3795 p->infd = inch; 3795 p->infd = inch;
3796 p->outfd = outch; 3796 p->outfd = outch;
3797 if (is_server && socktype == SOCK_STREAM) 3797 if (is_server && socktype != SOCK_DGRAM)
3798 p->status = Qlisten; 3798 p->status = Qlisten;
3799 3799
3800 /* Make the process marker point into the process buffer (if any). */ 3800 /* Make the process marker point into the process buffer (if any). */
3801 if (BUFFERP (buffer)) 3801 if (BUFFERP (buffer))
3802 set_marker_both (p->mark, buffer, 3802 set_marker_both (p->mark, buffer,