aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorMiles Bader2006-01-16 08:37:27 +0000
committerMiles Bader2006-01-16 08:37:27 +0000
commit41882805d6711e32ac0f066119226d84dbdedc13 (patch)
tree44f756cef3fbc4de2f229e93613a1a326da7f55d /src/process.c
parent6a2bd1a5019d2130c87ac5cf17f1322bf614b624 (diff)
parent28f74fdf77eaab2e9daf54e2d5b0b729c5201e4f (diff)
downloademacs-41882805d6711e32ac0f066119226d84dbdedc13.tar.gz
emacs-41882805d6711e32ac0f066119226d84dbdedc13.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 616-696) - Add lisp/mh-e/.arch-inventory - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. - lisp/gnus/ChangeLog: Remove duplicate entry * gnus--rel--5.10 (patch 147-181) - Update from CVS - Merge from emacs--cvs-trunk--0 - Update from CVS: lisp/mml.el (mml-preview): Doc fix. - Update from CVS: texi/message.texi: Fix default values. - Update from CVS: texi/gnus.texi (RSS): Addition.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c236
1 files changed, 184 insertions, 52 deletions
diff --git a/src/process.c b/src/process.c
index b66c768c256..cde2c606d93 100644
--- a/src/process.c
+++ b/src/process.c
@@ -40,6 +40,9 @@ Boston, MA 02110-1301, USA. */
40#include <sys/types.h> /* some typedefs are used in sys/file.h */ 40#include <sys/types.h> /* some typedefs are used in sys/file.h */
41#include <sys/file.h> 41#include <sys/file.h>
42#include <sys/stat.h> 42#include <sys/stat.h>
43#ifdef HAVE_INTTYPES_H
44#include <inttypes.h>
45#endif
43#ifdef HAVE_UNISTD_H 46#ifdef HAVE_UNISTD_H
44#include <unistd.h> 47#include <unistd.h>
45#endif 48#endif
@@ -118,6 +121,14 @@ Boston, MA 02110-1301, USA. */
118#include <sys/wait.h> 121#include <sys/wait.h>
119#endif 122#endif
120 123
124/* Disable IPv6 support for w32 until someone figures out how to do it
125 properly. */
126#ifdef WINDOWSNT
127# ifdef AF_INET6
128# undef AF_INET6
129# endif
130#endif
131
121#include "lisp.h" 132#include "lisp.h"
122#include "systime.h" 133#include "systime.h"
123#include "systty.h" 134#include "systty.h"
@@ -140,7 +151,10 @@ Boston, MA 02110-1301, USA. */
140Lisp_Object Qprocessp; 151Lisp_Object Qprocessp;
141Lisp_Object Qrun, Qstop, Qsignal; 152Lisp_Object Qrun, Qstop, Qsignal;
142Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; 153Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
143Lisp_Object Qlocal, Qdatagram; 154Lisp_Object Qlocal, Qipv4, Qdatagram;
155#ifdef AF_INET6
156Lisp_Object Qipv6;
157#endif
144Lisp_Object QCname, QCbuffer, QChost, QCservice, QCtype; 158Lisp_Object QCname, QCbuffer, QChost, QCservice, QCtype;
145Lisp_Object QClocal, QCremote, QCcoding; 159Lisp_Object QClocal, QCremote, QCcoding;
146Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; 160Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
@@ -1196,9 +1210,11 @@ a socket connection. */)
1196DEFUN ("format-network-address", Fformat_network_address, Sformat_network_address, 1210DEFUN ("format-network-address", Fformat_network_address, Sformat_network_address,
1197 1, 2, 0, 1211 1, 2, 0,
1198 doc: /* Convert network ADDRESS from internal format to a string. 1212 doc: /* Convert network ADDRESS from internal format to a string.
1213A 4 or 5 element vector represents an IPv4 address (with port number).
1214An 8 or 9 element vector represents an IPv6 address (with port number).
1199If optional second argument OMIT-PORT is non-nil, don't include a port 1215If optional second argument OMIT-PORT is non-nil, don't include a port
1200number in the string; in this case, interpret a 4 element vector as an 1216number in the string, even when present in ADDRESS.
1201IP address. Returns nil if format of ADDRESS is invalid. */) 1217Returns nil if format of ADDRESS is invalid. */)
1202 (address, omit_port) 1218 (address, omit_port)
1203 Lisp_Object address, omit_port; 1219 Lisp_Object address, omit_port;
1204{ 1220{
@@ -1208,13 +1224,13 @@ IP address. Returns nil if format of ADDRESS is invalid. */)
1208 if (STRINGP (address)) /* AF_LOCAL */ 1224 if (STRINGP (address)) /* AF_LOCAL */
1209 return address; 1225 return address;
1210 1226
1211 if (VECTORP (address)) /* AF_INET */ 1227 if (VECTORP (address)) /* AF_INET or AF_INET6 */
1212 { 1228 {
1213 register struct Lisp_Vector *p = XVECTOR (address); 1229 register struct Lisp_Vector *p = XVECTOR (address);
1214 Lisp_Object args[6]; 1230 Lisp_Object args[6];
1215 int nargs, i; 1231 int nargs, i;
1216 1232
1217 if (!NILP (omit_port) && (p->size == 4 || p->size == 5)) 1233 if (p->size == 4 || (p->size == 5 && !NILP (omit_port)))
1218 { 1234 {
1219 args[0] = build_string ("%d.%d.%d.%d"); 1235 args[0] = build_string ("%d.%d.%d.%d");
1220 nargs = 4; 1236 nargs = 4;
@@ -1224,6 +1240,16 @@ IP address. Returns nil if format of ADDRESS is invalid. */)
1224 args[0] = build_string ("%d.%d.%d.%d:%d"); 1240 args[0] = build_string ("%d.%d.%d.%d:%d");
1225 nargs = 5; 1241 nargs = 5;
1226 } 1242 }
1243 else if (p->size == 8 || (p->size == 9 && !NILP (omit_port)))
1244 {
1245 args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
1246 nargs = 8;
1247 }
1248 else if (p->size == 9)
1249 {
1250 args[0] = build_string ("[%x:%x:%x:%x:%x:%x:%x:%x]:%d");
1251 nargs = 9;
1252 }
1227 else 1253 else
1228 return Qnil; 1254 return Qnil;
1229 1255
@@ -2213,6 +2239,20 @@ conv_sockaddr_to_lisp (sa, len)
2213 cp = (unsigned char *)&sin->sin_addr; 2239 cp = (unsigned char *)&sin->sin_addr;
2214 break; 2240 break;
2215 } 2241 }
2242#ifdef AF_INET6
2243 case AF_INET6:
2244 {
2245 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
2246 uint16_t *ip6 = (uint16_t *)&sin6->sin6_addr;
2247 len = sizeof (sin6->sin6_addr)/2 + 1;
2248 address = Fmake_vector (make_number (len), Qnil);
2249 p = XVECTOR (address);
2250 p->contents[--len] = make_number (ntohs (sin6->sin6_port));
2251 for (i = 0; i < len; i++)
2252 p->contents[i] = make_number (ntohs (ip6[i]));
2253 return address;
2254 }
2255#endif
2216#ifdef HAVE_LOCAL_SOCKETS 2256#ifdef HAVE_LOCAL_SOCKETS
2217 case AF_LOCAL: 2257 case AF_LOCAL:
2218 { 2258 {
@@ -2257,6 +2297,13 @@ get_lisp_to_sockaddr_size (address, familyp)
2257 *familyp = AF_INET; 2297 *familyp = AF_INET;
2258 return sizeof (struct sockaddr_in); 2298 return sizeof (struct sockaddr_in);
2259 } 2299 }
2300#ifdef AF_INET6
2301 else if (p->size == 9)
2302 {
2303 *familyp = AF_INET6;
2304 return sizeof (struct sockaddr_in6);
2305 }
2306#endif
2260 } 2307 }
2261#ifdef HAVE_LOCAL_SOCKETS 2308#ifdef HAVE_LOCAL_SOCKETS
2262 else if (STRINGP (address)) 2309 else if (STRINGP (address))
@@ -2303,6 +2350,23 @@ conv_lisp_to_sockaddr (family, address, sa, len)
2303 sin->sin_port = htons (i); 2350 sin->sin_port = htons (i);
2304 cp = (unsigned char *)&sin->sin_addr; 2351 cp = (unsigned char *)&sin->sin_addr;
2305 } 2352 }
2353#ifdef AF_INET6
2354 else if (family == AF_INET6)
2355 {
2356 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
2357 uint16_t *ip6 = (uint16_t *)&sin6->sin6_addr;
2358 len = sizeof (sin6->sin6_addr) + 1;
2359 i = XINT (p->contents[--len]);
2360 sin6->sin6_port = htons (i);
2361 for (i = 0; i < len; i++)
2362 if (INTEGERP (p->contents[i]))
2363 {
2364 int j = XFASTINT (p->contents[i]) & 0xffff;
2365 ip6[i] = ntohs (j);
2366 }
2367 return;
2368 }
2369#endif
2306 } 2370 }
2307 else if (STRINGP (address)) 2371 else if (STRINGP (address))
2308 { 2372 {
@@ -2596,10 +2660,13 @@ a random port number is selected for the server.
2596stream type connection, `datagram' creates a datagram type connection. 2660stream type connection, `datagram' creates a datagram type connection.
2597 2661
2598:family FAMILY -- FAMILY is the address (and protocol) family for the 2662:family FAMILY -- FAMILY is the address (and protocol) family for the
2599service specified by HOST and SERVICE. The default address family is 2663service specified by HOST and SERVICE. The default (nil) is to use
2600Inet (or IPv4) for the host and port number specified by HOST and 2664whatever address family (IPv4 or IPv6) that is defined for the host
2601SERVICE. Other address families supported are: 2665and port number specified by HOST and SERVICE. Other address families
2666supported are:
2602 local -- for a local (i.e. UNIX) address specified by SERVICE. 2667 local -- for a local (i.e. UNIX) address specified by SERVICE.
2668 ipv4 -- use IPv4 address family only.
2669 ipv6 -- use IPv6 address family only.
2603 2670
2604:local ADDRESS -- ADDRESS is the local address used for the connection. 2671:local ADDRESS -- ADDRESS is the local address used for the connection.
2605This parameter is ignored when opening a client process. When specified 2672This parameter is ignored when opening a client process. When specified
@@ -2716,8 +2783,8 @@ usage: (make-network-process &rest ARGS) */)
2716 struct Lisp_Process *p; 2783 struct Lisp_Process *p;
2717#ifdef HAVE_GETADDRINFO 2784#ifdef HAVE_GETADDRINFO
2718 struct addrinfo ai, *res, *lres; 2785 struct addrinfo ai, *res, *lres;
2719 struct addrinfo hints; 2786 struct addrinfo hints;
2720 char *portstring, portbuf[128]; 2787 char *portstring, portbuf[128];
2721#else /* HAVE_GETADDRINFO */ 2788#else /* HAVE_GETADDRINFO */
2722 struct _emacs_addrinfo 2789 struct _emacs_addrinfo
2723 { 2790 {
@@ -2856,19 +2923,29 @@ usage: (make-network-process &rest ARGS) */)
2856 2923
2857 /* :family FAMILY -- nil (for Inet), local, or integer. */ 2924 /* :family FAMILY -- nil (for Inet), local, or integer. */
2858 tem = Fplist_get (contact, QCfamily); 2925 tem = Fplist_get (contact, QCfamily);
2859 if (INTEGERP (tem)) 2926 if (NILP (tem))
2860 family = XINT (tem);
2861 else
2862 { 2927 {
2863 if (NILP (tem)) 2928#if defined(HAVE_GETADDRINFO) && defined(AF_INET6)
2864 family = AF_INET; 2929 family = AF_UNSPEC;
2865#ifdef HAVE_LOCAL_SOCKETS 2930#else
2866 else if (EQ (tem, Qlocal)) 2931 family = AF_INET;
2867 family = AF_LOCAL;
2868#endif 2932#endif
2869 } 2933 }
2870 if (family < 0) 2934#ifdef HAVE_LOCAL_SOCKETS
2935 else if (EQ (tem, Qlocal))
2936 family = AF_LOCAL;
2937#endif
2938#ifdef AF_INET6
2939 else if (EQ (tem, Qipv6))
2940 family = AF_INET6;
2941#endif
2942 else if (EQ (tem, Qipv4))
2943 family = AF_INET;
2944 else if (INTEGERP (tem))
2945 family = XINT (tem);
2946 else
2871 error ("Unknown address family"); 2947 error ("Unknown address family");
2948
2872 ai.ai_family = family; 2949 ai.ai_family = family;
2873 2950
2874 /* :service SERVICE -- string, integer (port number), or t (random port). */ 2951 /* :service SERVICE -- string, integer (port number), or t (random port). */
@@ -2934,7 +3011,7 @@ usage: (make-network-process &rest ARGS) */)
2934 QUIT; 3011 QUIT;
2935 memset (&hints, 0, sizeof (hints)); 3012 memset (&hints, 0, sizeof (hints));
2936 hints.ai_flags = 0; 3013 hints.ai_flags = 0;
2937 hints.ai_family = NILP (Fplist_member (contact, QCfamily)) ? AF_UNSPEC : family; 3014 hints.ai_family = family;
2938 hints.ai_socktype = socktype; 3015 hints.ai_socktype = socktype;
2939 hints.ai_protocol = 0; 3016 hints.ai_protocol = 0;
2940 ret = getaddrinfo (SDATA (host), portstring, &hints, &res); 3017 ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
@@ -3523,6 +3600,21 @@ static struct ifflag_def ifflag_table[] = {
3523#ifdef IFF_DYNAMIC 3600#ifdef IFF_DYNAMIC
3524 { IFF_DYNAMIC, "dynamic" }, 3601 { IFF_DYNAMIC, "dynamic" },
3525#endif 3602#endif
3603#ifdef IFF_OACTIVE
3604 { IFF_OACTIVE, "oactive" }, /* OpenBSD: transmission in progress */
3605#endif
3606#ifdef IFF_SIMPLEX
3607 { IFF_SIMPLEX, "simplex" }, /* OpenBSD: can't hear own transmissions */
3608#endif
3609#ifdef IFF_LINK0
3610 { IFF_LINK0, "link0" }, /* OpenBSD: per link layer defined bit */
3611#endif
3612#ifdef IFF_LINK1
3613 { IFF_LINK1, "link1" }, /* OpenBSD: per link layer defined bit */
3614#endif
3615#ifdef IFF_LINK2
3616 { IFF_LINK2, "link2" }, /* OpenBSD: per link layer defined bit */
3617#endif
3526 { 0, 0 } 3618 { 0, 0 }
3527}; 3619};
3528 3620
@@ -3559,7 +3651,7 @@ FLAGS is the current flags of the interface. */)
3559 int fnum; 3651 int fnum;
3560 3652
3561 any++; 3653 any++;
3562 for (fp = ifflag_table; flags != 0 && fp; fp++) 3654 for (fp = ifflag_table; flags != 0 && fp->flag_sym; fp++)
3563 { 3655 {
3564 if (flags & fp->flag_bit) 3656 if (flags & fp->flag_bit)
3565 { 3657 {
@@ -3595,11 +3687,15 @@ FLAGS is the current flags of the interface. */)
3595 res = Fcons (elt, res); 3687 res = Fcons (elt, res);
3596 3688
3597 elt = Qnil; 3689 elt = Qnil;
3598#if defined(SIOCGIFNETMASK) && defined(ifr_netmask) 3690#if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR))
3599 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) 3691 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0)
3600 { 3692 {
3601 any++; 3693 any++;
3694#ifdef HAVE_STRUCT_IFREQ_IFR_NETMASK
3602 elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask)); 3695 elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask));
3696#else
3697 elt = conv_sockaddr_to_lisp (&rq.ifr_addr, sizeof (rq.ifr_addr));
3698#endif
3603 } 3699 }
3604#endif 3700#endif
3605 res = Fcons (elt, res); 3701 res = Fcons (elt, res);
@@ -3817,6 +3913,9 @@ server_accept_connection (server, channel)
3817 union u_sockaddr { 3913 union u_sockaddr {
3818 struct sockaddr sa; 3914 struct sockaddr sa;
3819 struct sockaddr_in in; 3915 struct sockaddr_in in;
3916#ifdef AF_INET6
3917 struct sockaddr_in6 in6;
3918#endif
3820#ifdef HAVE_LOCAL_SOCKETS 3919#ifdef HAVE_LOCAL_SOCKETS
3821 struct sockaddr_un un; 3920 struct sockaddr_un un;
3822#endif 3921#endif
@@ -3873,6 +3972,26 @@ server_accept_connection (server, channel)
3873 } 3972 }
3874 break; 3973 break;
3875 3974
3975#ifdef AF_INET6
3976 case AF_INET6:
3977 {
3978 Lisp_Object args[9];
3979 uint16_t *ip6 = (uint16_t *)&saddr.in6.sin6_addr;
3980 int i;
3981 args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
3982 for (i = 0; i < 8; i++)
3983 args[i+1] = make_number (ntohs(ip6[i]));
3984 host = Fformat (9, args);
3985 service = make_number (ntohs (saddr.in.sin_port));
3986
3987 args[0] = build_string (" <[%s]:%d>");
3988 args[1] = host;
3989 args[2] = service;
3990 caller = Fformat (3, args);
3991 }
3992 break;
3993#endif
3994
3876#ifdef HAVE_LOCAL_SOCKETS 3995#ifdef HAVE_LOCAL_SOCKETS
3877 case AF_LOCAL: 3996 case AF_LOCAL:
3878#endif 3997#endif
@@ -5942,97 +6061,100 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
5942 CHECK_SYMBOL (sigcode); 6061 CHECK_SYMBOL (sigcode);
5943 name = SDATA (SYMBOL_NAME (sigcode)); 6062 name = SDATA (SYMBOL_NAME (sigcode));
5944 6063
6064 if (!strncmp(name, "SIG", 3))
6065 name += 3;
6066
5945 if (0) 6067 if (0)
5946 ; 6068 ;
5947#ifdef SIGHUP 6069#ifdef SIGHUP
5948 handle_signal ("SIGHUP", SIGHUP); 6070 handle_signal ("HUP", SIGHUP);
5949#endif 6071#endif
5950#ifdef SIGINT 6072#ifdef SIGINT
5951 handle_signal ("SIGINT", SIGINT); 6073 handle_signal ("INT", SIGINT);
5952#endif 6074#endif
5953#ifdef SIGQUIT 6075#ifdef SIGQUIT
5954 handle_signal ("SIGQUIT", SIGQUIT); 6076 handle_signal ("QUIT", SIGQUIT);
5955#endif 6077#endif
5956#ifdef SIGILL 6078#ifdef SIGILL
5957 handle_signal ("SIGILL", SIGILL); 6079 handle_signal ("ILL", SIGILL);
5958#endif 6080#endif
5959#ifdef SIGABRT 6081#ifdef SIGABRT
5960 handle_signal ("SIGABRT", SIGABRT); 6082 handle_signal ("ABRT", SIGABRT);
5961#endif 6083#endif
5962#ifdef SIGEMT 6084#ifdef SIGEMT
5963 handle_signal ("SIGEMT", SIGEMT); 6085 handle_signal ("EMT", SIGEMT);
5964#endif 6086#endif
5965#ifdef SIGKILL 6087#ifdef SIGKILL
5966 handle_signal ("SIGKILL", SIGKILL); 6088 handle_signal ("KILL", SIGKILL);
5967#endif 6089#endif
5968#ifdef SIGFPE 6090#ifdef SIGFPE
5969 handle_signal ("SIGFPE", SIGFPE); 6091 handle_signal ("FPE", SIGFPE);
5970#endif 6092#endif
5971#ifdef SIGBUS 6093#ifdef SIGBUS
5972 handle_signal ("SIGBUS", SIGBUS); 6094 handle_signal ("BUS", SIGBUS);
5973#endif 6095#endif
5974#ifdef SIGSEGV 6096#ifdef SIGSEGV
5975 handle_signal ("SIGSEGV", SIGSEGV); 6097 handle_signal ("SEGV", SIGSEGV);
5976#endif 6098#endif
5977#ifdef SIGSYS 6099#ifdef SIGSYS
5978 handle_signal ("SIGSYS", SIGSYS); 6100 handle_signal ("SYS", SIGSYS);
5979#endif 6101#endif
5980#ifdef SIGPIPE 6102#ifdef SIGPIPE
5981 handle_signal ("SIGPIPE", SIGPIPE); 6103 handle_signal ("PIPE", SIGPIPE);
5982#endif 6104#endif
5983#ifdef SIGALRM 6105#ifdef SIGALRM
5984 handle_signal ("SIGALRM", SIGALRM); 6106 handle_signal ("ALRM", SIGALRM);
5985#endif 6107#endif
5986#ifdef SIGTERM 6108#ifdef SIGTERM
5987 handle_signal ("SIGTERM", SIGTERM); 6109 handle_signal ("TERM", SIGTERM);
5988#endif 6110#endif
5989#ifdef SIGURG 6111#ifdef SIGURG
5990 handle_signal ("SIGURG", SIGURG); 6112 handle_signal ("URG", SIGURG);
5991#endif 6113#endif
5992#ifdef SIGSTOP 6114#ifdef SIGSTOP
5993 handle_signal ("SIGSTOP", SIGSTOP); 6115 handle_signal ("STOP", SIGSTOP);
5994#endif 6116#endif
5995#ifdef SIGTSTP 6117#ifdef SIGTSTP
5996 handle_signal ("SIGTSTP", SIGTSTP); 6118 handle_signal ("TSTP", SIGTSTP);
5997#endif 6119#endif
5998#ifdef SIGCONT 6120#ifdef SIGCONT
5999 handle_signal ("SIGCONT", SIGCONT); 6121 handle_signal ("CONT", SIGCONT);
6000#endif 6122#endif
6001#ifdef SIGCHLD 6123#ifdef SIGCHLD
6002 handle_signal ("SIGCHLD", SIGCHLD); 6124 handle_signal ("CHLD", SIGCHLD);
6003#endif 6125#endif
6004#ifdef SIGTTIN 6126#ifdef SIGTTIN
6005 handle_signal ("SIGTTIN", SIGTTIN); 6127 handle_signal ("TTIN", SIGTTIN);
6006#endif 6128#endif
6007#ifdef SIGTTOU 6129#ifdef SIGTTOU
6008 handle_signal ("SIGTTOU", SIGTTOU); 6130 handle_signal ("TTOU", SIGTTOU);
6009#endif 6131#endif
6010#ifdef SIGIO 6132#ifdef SIGIO
6011 handle_signal ("SIGIO", SIGIO); 6133 handle_signal ("IO", SIGIO);
6012#endif 6134#endif
6013#ifdef SIGXCPU 6135#ifdef SIGXCPU
6014 handle_signal ("SIGXCPU", SIGXCPU); 6136 handle_signal ("XCPU", SIGXCPU);
6015#endif 6137#endif
6016#ifdef SIGXFSZ 6138#ifdef SIGXFSZ
6017 handle_signal ("SIGXFSZ", SIGXFSZ); 6139 handle_signal ("XFSZ", SIGXFSZ);
6018#endif 6140#endif
6019#ifdef SIGVTALRM 6141#ifdef SIGVTALRM
6020 handle_signal ("SIGVTALRM", SIGVTALRM); 6142 handle_signal ("VTALRM", SIGVTALRM);
6021#endif 6143#endif
6022#ifdef SIGPROF 6144#ifdef SIGPROF
6023 handle_signal ("SIGPROF", SIGPROF); 6145 handle_signal ("PROF", SIGPROF);
6024#endif 6146#endif
6025#ifdef SIGWINCH 6147#ifdef SIGWINCH
6026 handle_signal ("SIGWINCH", SIGWINCH); 6148 handle_signal ("WINCH", SIGWINCH);
6027#endif 6149#endif
6028#ifdef SIGINFO 6150#ifdef SIGINFO
6029 handle_signal ("SIGINFO", SIGINFO); 6151 handle_signal ("INFO", SIGINFO);
6030#endif 6152#endif
6031#ifdef SIGUSR1 6153#ifdef SIGUSR1
6032 handle_signal ("SIGUSR1", SIGUSR1); 6154 handle_signal ("USR1", SIGUSR1);
6033#endif 6155#endif
6034#ifdef SIGUSR2 6156#ifdef SIGUSR2
6035 handle_signal ("SIGUSR2", SIGUSR2); 6157 handle_signal ("USR2", SIGUSR2);
6036#endif 6158#endif
6037 else 6159 else
6038 error ("Undefined signal name %s", name); 6160 error ("Undefined signal name %s", name);
@@ -6719,6 +6841,10 @@ init_process ()
6719#ifdef HAVE_LOCAL_SOCKETS 6841#ifdef HAVE_LOCAL_SOCKETS
6720 ADD_SUBFEATURE (QCfamily, Qlocal); 6842 ADD_SUBFEATURE (QCfamily, Qlocal);
6721#endif 6843#endif
6844 ADD_SUBFEATURE (QCfamily, Qipv4);
6845#ifdef AF_INET6
6846 ADD_SUBFEATURE (QCfamily, Qipv6);
6847#endif
6722#ifdef HAVE_GETSOCKNAME 6848#ifdef HAVE_GETSOCKNAME
6723 ADD_SUBFEATURE (QCservice, Qt); 6849 ADD_SUBFEATURE (QCservice, Qt);
6724#endif 6850#endif
@@ -6777,6 +6903,12 @@ syms_of_process ()
6777 staticpro (&Qlisten); 6903 staticpro (&Qlisten);
6778 Qlocal = intern ("local"); 6904 Qlocal = intern ("local");
6779 staticpro (&Qlocal); 6905 staticpro (&Qlocal);
6906 Qipv4 = intern ("ipv4");
6907 staticpro (&Qipv4);
6908#ifdef AF_INET6
6909 Qipv6 = intern ("ipv6");
6910 staticpro (&Qipv6);
6911#endif
6780 Qdatagram = intern ("datagram"); 6912 Qdatagram = intern ("datagram");
6781 staticpro (&Qdatagram); 6913 staticpro (&Qdatagram);
6782 6914