chiark
/
gitweb
/
~mdw
/
sw-tools
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a77e2bf
)
Merge some changes from 1.0.4. Very odd.
1.0.5mdw1
author
mdw
<mdw>
Mon, 27 Sep 2004 14:01:32 +0000
(14:01 +0000)
committer
mdw
<mdw>
Mon, 27 Sep 2004 14:01:32 +0000
(14:01 +0000)
configure.in
patch
|
blob
|
blame
|
history
src/sw_rsh.c
patch
|
blob
|
blame
|
history
diff --git
a/configure.in
b/configure.in
index a4a72c0c17d8adf23b978e032ea57efb2bd78003..7d6fc6753614dbaf722576b158fad4a7d3cdf0b8 100644
(file)
--- a/
configure.in
+++ b/
configure.in
@@
-19,7
+19,7
@@
dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl --- Boring boilerplate ---
AC_INIT(src/sw.c)
dnl --- Boring boilerplate ---
AC_INIT(src/sw.c)
-AM_INIT_AUTOMAKE(sw-tools, 1.0.
4
)
+AM_INIT_AUTOMAKE(sw-tools, 1.0.
5mdw1
)
AM_CONFIG_HEADER(config.h)
dnl --- Work out the architecture name ---
AM_CONFIG_HEADER(config.h)
dnl --- Work out the architecture name ---
diff --git
a/src/sw_rsh.c
b/src/sw_rsh.c
index 785da7dfc71b3e8959ebdf419a2ddef059469aac..e0543511c4fd48062c5c597f3fa7e2c0d52dec3c 100644
(file)
--- a/
src/sw_rsh.c
+++ b/
src/sw_rsh.c
@@
-396,7
+396,7
@@
static void remote(sw_remote *r, const char *cmd, char *argv[], char *env[])
sym_table t;
sym_create(&t);
env_import(&t, env);
sym_table t;
sym_create(&t);
env_import(&t, env);
- if (env != environ) {
+ if (env
[0] && env
!= environ) {
free(env);
env_import(&t, environ);
}
free(env);
env_import(&t, environ);
}
@@
-538,7
+538,15
@@
void swrsh_remote(const char *cmd)
r.fdin = 0;
r.fdout = 1;
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);
for (;;) {
int t = pkrecv(&r);