• Peter Maydell's avatar
    slirp: fork_exec(): create and connect child socket before fork() · 5c75f3ad
    Peter Maydell authored
    Currently fork_exec() fork()s, and then creates and connects the
    child socket which it uses for communication with the parent in
    the child process. This is awkward because the child has no
    mechanism to report failure back to the parent, which might end
    up blocked forever in accept(). The child code also has an issue
    pointed out by Coverity (CID 1005727), where if the qemu_socket()
    call fails it will pass -1 as a file descriptor to connect().
    
    Fix these issues by moving the creation of the child's end of
    the socket to before the fork(), where we are in a position to
    handle a possible failure.
    Signed-off-by: 's avatarPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: 's avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
    5c75f3ad
Name
Last commit
Last update
..
COPYRIGHT Loading commit data...
Makefile.objs Loading commit data...
arp_table.c Loading commit data...
bootp.c Loading commit data...
bootp.h Loading commit data...
cksum.c Loading commit data...
debug.h Loading commit data...
dhcpv6.c Loading commit data...
dhcpv6.h Loading commit data...
dnssearch.c Loading commit data...
if.c Loading commit data...
if.h Loading commit data...
ip.h Loading commit data...
ip6.h Loading commit data...
ip6_icmp.c Loading commit data...
ip6_icmp.h Loading commit data...
ip6_input.c Loading commit data...
ip6_output.c Loading commit data...
ip_icmp.c Loading commit data...
ip_icmp.h Loading commit data...
ip_input.c Loading commit data...
ip_output.c Loading commit data...
libslirp.h Loading commit data...
main.h Loading commit data...
mbuf.c Loading commit data...
mbuf.h Loading commit data...
misc.c Loading commit data...
misc.h Loading commit data...
ncsi-pkt.h Loading commit data...
ncsi.c Loading commit data...
ndp_table.c Loading commit data...
sbuf.c Loading commit data...
sbuf.h Loading commit data...
slirp.c Loading commit data...
slirp.h Loading commit data...
slirp_config.h Loading commit data...
socket.c Loading commit data...
socket.h Loading commit data...
tcp.h Loading commit data...
tcp_input.c Loading commit data...
tcp_output.c Loading commit data...
tcp_subr.c Loading commit data...
tcp_timer.c Loading commit data...
tcp_timer.h Loading commit data...
tcp_var.h Loading commit data...
tcpip.h Loading commit data...
tftp.c Loading commit data...
tftp.h Loading commit data...
udp.c Loading commit data...
udp.h Loading commit data...
udp6.c Loading commit data...