Xterm + irssi not working

If I have an open xterm window and I type “xterm -e irssi”, irssi starts fine. But when I try to close the irssi window it doesn’t close but just displays “Irssi: Reloaded configuration”. In this situation I can only close the window by typing “/quit” in irssi. This does not happen if I start irssi by just typing “irssi” in xterm. Then I can close the window normally by pressing the X that should close windows.

How can I configure FVWMButtons to have an icon that starts irssi in a xterm window that I CAN close by pressing the X. The next doesn’t work as I described above:

*FvwmButtons: (1x1, ActionOnPress, Icon icons/irssi24.png, ActiveIcon icons/irssi48.png, Action(Mouse 1) `exec exec xterm -e irssi`)

This is not really an fvwm question. If you use Delete or Close, then fvwm just sends xterm a request to delete itself using X delete protocol. This is implemented in xterm by sending HUP signal to the main command (that is either the login shell or something you specify with -e). irssi interprets HUP to reload the configuration. You may ask on the irssi list how to configure HUP to behave like STOP.

Alternativelly, start a shell, not irssi directly, as the main xterm command, i.e.:

xterm -e sh -c 'true && irssi'

(Here, “true &&” is needed to workaround bash being too smart for what we want to achieve and using exec instead of fork.)