#1437: Automatically read from STDIN in AgaviConsoleRequest
-------------------------+--------------------------------------------------
Reporter: david | Owner: david
Type: enhancement | Status: new
Priority: normal | Milestone: 1.1
Component: request | Version:
Severity: normal | Keywords:
Has_patch: 0 |
-------------------------+--------------------------------------------------
We can use {{{posix_isatty(STDIN)}}} to detect whether or not something is
piped into the process - with {{{true}}}, there is no {{{STDIN}}} input,
with {{{false}}}, there is.
That doesn't work on Windows though; it appears that
{{{stream_get_meta_data(STDIN)}}} will report {{{false}}} for "seekable"
if there input (since {{{STDIN}}} does not support seeks), and
{{{true}}} if there is no input. Verified to work on Windows, Mac OS and
Linux.
--
Ticket URL: <http://trac.agavi.org/ticket/1437>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets