4bc0731f85
- remove GNU_CONFIGURE and add USE_AUTOCONF - use SEPARATE_BUILD
33 lines
756 B
Plaintext
33 lines
756 B
Plaintext
--- libmsg/connect.c.orig Tue May 11 13:45:26 1999
|
|
+++ libmsg/connect.c Tue May 11 13:48:06 1999
|
|
@@ -106,11 +106,13 @@
|
|
|
|
/* bind it to a unix-domain at a temporary address */
|
|
addr.sun_family = AF_UNIX;
|
|
- tmpnam(addr.sun_path);
|
|
+ sprintf(addr.sun_path, "%s/xx.XXXXXXXX", P_tmpdir);
|
|
+ close(mkstemp(addr.sun_path));
|
|
path = strdup(addr.sun_path);
|
|
len = strlen(addr.sun_path);
|
|
|
|
if (bind(s, (struct sockaddr *) &addr, sizeof addr) < 0){
|
|
+ unlink(path);
|
|
perror("bind");
|
|
return -1;
|
|
}
|
|
@@ -119,10 +121,14 @@
|
|
|
|
fd = wilyfifotalk(); /* fifo to wily */
|
|
if(fd<0)
|
|
+ {
|
|
+ unlink(path);
|
|
return -1;
|
|
+ }
|
|
nwritten = write(fd, addr.sun_path, len);
|
|
close(fd);
|
|
if(nwritten !=len){
|
|
+ unlink(path);
|
|
perror("write to wily");
|
|
return -1;
|
|
}
|