Talk:Check input device is a terminal: Difference between revisions

Content added Content deleted
(→‎Rename: Alt. suggestion.)
(Determine interactive status)
Line 3: Line 3:


: Or ''"Determine input from terminal"''? --[[User:Paddy3118|Paddy3118]] 22:48, 12 February 2013 (UTC)
: Or ''"Determine input from terminal"''? --[[User:Paddy3118|Paddy3118]] 22:48, 12 February 2013 (UTC)

Actually, it might be better to know whether the program is to operate interactively or not. I think this is probably what we need to know from an application point of view. To be interactive, we need to know that both the input and device and the output device is a terminal. If either the input device or output device are not terminals, then in most cases we probably do not want to be interactive.

I suggest we return three flags:

* Flag indicating input device is a terminal (applications using the code snippet should not obtain use input)
* Flag indicating that the output device is a terminal (if not then the application should not attempt to display)
* Flag indicating interactive (ie both of the above flags are set)

This could mean a potential rename to "Determine interactive status" (or something like that).

I suggest we drop the obtain input bit of the task, because we already have separate tasks for that.

[[User:Markhobley|Markhobley]] 15:58, 20 February 2013 (UTC)