diff options
| author | ruki <[email protected]> | 2020-01-31 23:32:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-01-31 15:15:47 +0800 |
| commit | 1278352ff02dcbb52c5a866c3b477581c1c4eebc (patch) | |
| tree | 1eebb8c36fe6af08d3a0fda12f099381270a5d84 /xmake/core/base/pipe.lua | |
| parent | 20c8823da8a5bde7de52479d7c504a6bde8a23fb (diff) | |
fix pipe open and openpair
Diffstat (limited to 'xmake/core/base/pipe.lua')
| -rw-r--r-- | xmake/core/base/pipe.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/base/pipe.lua b/xmake/core/base/pipe.lua index 57797a46b..d99b8bcb4 100644 --- a/xmake/core/base/pipe.lua +++ b/xmake/core/base/pipe.lua @@ -289,9 +289,10 @@ end -- function pipe.open(name, mode, buffsize) + -- open named pipe local pipefile, errors = io.pipe_open(name, mode, buffsize or 0) if pipefile then - return _pipe.new(pipefile, name) + return _instance.new(pipefile, name) else return nil, string.format("failed to open pipe: %s, error: %s", name, errors or "unknown") end @@ -308,7 +309,7 @@ function pipe.openpair(buffsize) -- open anonymous pipe pair local rpipefile, wpipefile, errors = io.pipe_openpair(buffsize or 0) if rpipefile and wpipefile then - return _pipe.new(rpipefile), _pipe.new(wpipefile) + return _instance.new(rpipefile), _instance.new(wpipefile) else return nil, nil, string.format("failed to open anonymous pipe pair, error: %s", errors or "unknown") end |
