summaryrefslogtreecommitdiff
path: root/source/core/slang-process.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-11-30 16:50:05 -0500
committerGitHub <noreply@github.com>2021-11-30 16:50:05 -0500
commitce12e1d64d6b0b62609f061d3773a7e8b35849c3 (patch)
tree72da79208edff4fdebfc32db759ecca21716c260 /source/core/slang-process.h
parentace4e334bc5fb299d2890b5e3f35dfd84ea32606 (diff)
Auto flush for streams for stdin/out in slang-test (#2035)
* #include an absolute path didn't work - because paths were taken to always be relative. * Move StreamType from Process to StdStreamType in slang-stream.h * Disable buffering for stdout/stderr for slang-test. * Improve comment.
Diffstat (limited to 'source/core/slang-process.h')
-rw-r--r--source/core/slang-process.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/source/core/slang-process.h b/source/core/slang-process.h
index 7cd7596ae..6d86d8b14 100644
--- a/source/core/slang-process.h
+++ b/source/core/slang-process.h
@@ -16,14 +16,6 @@ namespace Slang {
class Process : public RefObject
{
public:
- enum class StreamType
- {
- ErrorOut,
- StdOut,
- StdIn,
- CountOf,
- };
-
typedef uint32_t Flags;
struct Flag
{
@@ -34,7 +26,7 @@ public:
};
/// Get the stream for the type
- Stream* getStream(StreamType type) const { return m_streams[Index(type)]; }
+ Stream* getStream(StdStreamType type) const { return m_streams[Index(type)]; }
/// Get the value returned from the process when it exited/returned.
int32_t getReturnValue() const { return m_returnValue; }
@@ -71,7 +63,7 @@ public:
static void sleepCurrentThread(Int timeInMs);
/// Get a standard stream
- static SlangResult getStdStream(StreamType type, RefPtr<Stream>& out);
+ static SlangResult getStdStream(StdStreamType type, RefPtr<Stream>& out);
/// Get the clock frequency
static uint64_t getClockFrequency();
@@ -81,7 +73,7 @@ public:
protected:
int32_t m_returnValue = 0; ///< Value returned if process terminated
- RefPtr<Stream> m_streams[Index(StreamType::CountOf)]; ///< Streams to communicate with the process
+ RefPtr<Stream> m_streams[Index(StdStreamType::CountOf)]; ///< Streams to communicate with the process
};
}