Added .BAT for async command I/O in one window

This commit is contained in:
Shoghi Cervantes Pueyo
2012-12-17 19:05:50 +01:00
parent adb795be22
commit 0086900469
3 changed files with 34 additions and 2 deletions

View File

@ -27,5 +27,9 @@ the Free Software Foundation, either version 3 of the License, or
$fp = fopen(dirname(__FILE__)."/console.in","wb");
while(true){
echo "/";fwrite($fp, fgets(STDIN));
$l = fgets(STDIN);
fwrite($fp, $l);
if(strtolower(trim($l)) === "stop" and isset($argv[1]) and trim($argv[1]) == "1"){
sleep(5);die();
}
}