sym_table t;
sym_create(&t);
env_import(&t, env);
- if (env != environ) {
+ if (env[0] && env != environ) {
free(env);
env_import(&t, environ);
}
r.fdin = 0;
r.fdout = 1;
- /* --- Read packets from the remote host --- */
+ /* --- Object if stdin is a terminal --- */
+
+ if (isatty(STDIN_FILENO)) {
+ die(EXIT_FAILURE,
+ "don't use the `--remote' option unless "
+ "you know what you're doing.");
+ }
+
+ /* --- Read packets from the remote host --- */
for (;;) {
int t = pkrecv(&r);