Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Strip the leading slash of the rest string.
[ashd.git]
/
lib
/
proc.c
diff --git
a/lib/proc.c
b/lib/proc.c
index
f7b0d9b
..
efd2767
100644
(file)
--- a/
lib/proc.c
+++ b/
lib/proc.c
@@
-35,7
+35,7
@@
int stdmkchild(char **argv)
pid_t pid;
int fd[2];
pid_t pid;
int fd[2];
- if(socketpair(PF_UNIX, SOCK_
DGRAM
, 0, fd))
+ if(socketpair(PF_UNIX, SOCK_
SEQPACKET
, 0, fd))
return(-1);
if((pid = fork()) < 0)
return(-1);
return(-1);
if((pid = fork()) < 0)
return(-1);
@@
-98,8
+98,10
@@
int recvfd(int sock, char **data, size_t *datalen)
msg.msg_controllen = sizeof(cbuf);
ret = recvmsg(sock, &msg, 0);
msg.msg_controllen = sizeof(cbuf);
ret = recvmsg(sock, &msg, 0);
- if(ret < 0) {
+ if(ret <
=
0) {
free(buf);
free(buf);
+ if(ret == 0)
+ errno = 0;
return(-1);
}
return(-1);
}