From: Helge Norberg Date: Tue, 24 Jan 2017 15:12:28 +0000 (+0100) Subject: [general] #529 Handle stdin EOF as EXIT. X-Git-Tag: 2.1.0_Beta2~122 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fab1f6b6fc8534cb16bd1f1675c96bf6b6a89379;hp=b9c366f117a171c591d16b8a7a69bbf532aa0e5c;p=casparcg [general] #529 Handle stdin EOF as EXIT. --- diff --git a/CHANGELOG b/CHANGELOG index 7dbc5555f..71992b862 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ General whether a build is newer or older than an other. o Changed configuration element mipmapping_default_on to mipmapping-default-on for consistency with the rest of the configuration (Jesper Stærkær). + o Handle stdin EOF as EXIT. Consumers --------- diff --git a/shell/main.cpp b/shell/main.cpp index 7db474e7e..b90bd4001 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -118,9 +118,8 @@ void do_run( std::wstring wcmd; while(true) { - std::getline(std::wcin, wcmd); // TODO: It's blocking... - - //boost::to_upper(wcmd); + if (!std::getline(std::wcin, wcmd)) // TODO: It's blocking... + wcmd = L"EXIT"; // EOF, handle as EXIT if(boost::iequals(wcmd, L"EXIT") || boost::iequals(wcmd, L"Q") || boost::iequals(wcmd, L"QUIT") || boost::iequals(wcmd, L"BYE")) {