strange ssh behavior with environment modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have a strange interaction problem between ssh and modules, and it does not happen when I use rsh! It is better to show the example:

First you need this simple shell script:
$ cat prog
#!/bin/bash

function process_int {
  echo -n "INT> "
  read LINE
  echo to stdout $LINE
  exit 2
}

trap process_int SIGINT
sleep 30
$

Then I type this command, hit ctrl-c (after the module list is echo'ed on the screen):

$ ssh -t localhost source /opt/Modules/init/tcsh '&&' module list '&&' $(pwd)/prog
Currently Loaded Modulefiles:
  1) make/3.81a

Connection to localhost closed.
$

As you can see, the trap did not operate.

Let's try again, but without "module list":

$ ssh -t localhost source /opt/Modules/init/tcsh '&&' $(pwd)/prog
INT> hi
to stdout hi

Connection to localhost closed.
$

This time, the trap has no problems working. If I repeat the same experiment with rsh instead, the trap works for both cases! There is some strange interaction here, can someone explain?

This is with modules 3.2.6, tcl 8.5.2 and openssh 5.1p1.

Thanks,
Martin

[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux