fixup: ping.exe works with cmd.exe pipe

This commit is contained in:
Jan Edmund Lazo
2018-03-18 20:17:09 -04:00
parent e6ee06ee11
commit ad6d577314

View File

@@ -677,11 +677,10 @@ describe('jobs', function()
-- ..c.."', '-c', '"..c.."'])") -- ..c.."', '-c', '"..c.."'])")
-- Create child with several descendants. -- Create child with several descendants.
local j = (iswin() local sleep_cmd = (iswin()
and eval([=[jobstart('start /b cmd /c "ping 127.0.0.1 -n 1 -w 30000 > NUL"]=] and 'ping -n 31 127.0.0.1'
..[=[ & start /b cmd /c "ping 127.0.0.1 -n 1 -w 40000 > NUL"]=] or 'sleep 30')
..[=[ & start /b cmd /c "ping 127.0.0.1 -n 1 -w 50000 > NUL"')]=]) local j = eval("jobstart('"..sleep_cmd..' | '..sleep_cmd..' | '..sleep_cmd.."')")
or eval("jobstart('sleep 30 | sleep 30 | sleep 30')"))
local ppid = funcs.jobpid(j) local ppid = funcs.jobpid(j)
local children local children
retry(nil, nil, function() retry(nil, nil, function()