qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-3.1 4/4] slirp: fork_exec(): create and conn


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PATCH for-3.1 4/4] slirp: fork_exec(): create and connect child socket before fork()
Date: Wed, 7 Nov 2018 00:11:38 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Peter Maydell, le mar. 06 nov. 2018 15:13:23 +0000, a ecrit:
> 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: Peter Maydell <address@hidden>

Applied, thanks!

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]