Skip to content

Commit

Permalink
Always disable interactive mode on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Nov 7, 2016
1 parent 1b2a266 commit c2f2f90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -60,6 +60,8 @@ This means that it keeps running in the foreground and accepts commands from

You can pass the `--no-interaction` argument to disable this interactive mode
so that it does not accept any commands from `STDIN`.
The interactive mode is always disabled on Windows, because it's impossible to
read from `STDIN` without blocking the whole daemon.

### Client configuration

Expand Down
2 changes: 1 addition & 1 deletion src/App.php
Expand Up @@ -65,7 +65,7 @@ public function start(array $args)
'socket' => 'socks://localhost:9050',
'measureTraffic' => true,
'measureTime' => true,
'interactive' => !isset($args['no-interaction']) && !isset($args['n']) && defined('STDIN') && is_resource(STDIN),
'interactive' => DIRECTORY_SEPARATOR === '/' && !isset($args['no-interaction']) && !isset($args['n']) && defined('STDIN') && is_resource(STDIN),
);

$settings = $this->parseSocksSocket($args['socket']);
Expand Down

0 comments on commit c2f2f90

Please sign in to comment.