mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-21 12:01:00 +00:00
parent
e747ec987b
commit
8e3d1cba5a
@ -589,6 +589,9 @@ func makeCommand(pid int, bin []string, config *Config, inFile, outFile *os.File
|
|||||||
}
|
}
|
||||||
c.cmd = cmd
|
c.cmd = cmd
|
||||||
wp.Close()
|
wp.Close()
|
||||||
|
// Note: we explicitly close inwp before calling handshake even though we defer it above.
|
||||||
|
// If we don't do it and executor exits before writing handshake reply,
|
||||||
|
// reading from inrp will hang since we hold another end of the pipe open.
|
||||||
inwp.Close()
|
inwp.Close()
|
||||||
|
|
||||||
if c.config.Flags&FlagUseForkServer != 0 {
|
if c.config.Flags&FlagUseForkServer != 0 {
|
||||||
@ -615,7 +618,7 @@ func (c *command) close() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handshake sends handshakeReq and waits for handshakeReply (sandbox setup can take significant time).
|
// handshake sends handshakeReq and waits for handshakeReply.
|
||||||
func (c *command) handshake() error {
|
func (c *command) handshake() error {
|
||||||
req := &handshakeReq{
|
req := &handshakeReq{
|
||||||
magic: inMagic,
|
magic: inMagic,
|
||||||
@ -641,6 +644,7 @@ func (c *command) handshake() error {
|
|||||||
}
|
}
|
||||||
read <- nil
|
read <- nil
|
||||||
}()
|
}()
|
||||||
|
// Sandbox setup can take significant time.
|
||||||
timeout := time.NewTimer(time.Minute)
|
timeout := time.NewTimer(time.Minute)
|
||||||
select {
|
select {
|
||||||
case err := <-read:
|
case err := <-read:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user