Hi all,
say I have the following script:
--8<---------------cut here---------------start------------->8---
#!/bin/env fish
function on_SIGINT --on-signal SIGINT
echo "Got SIGINT!"
end
epiphany
--8<---------------cut here---------------end--------------->8---
When I run it, it just opens the epiphany browser in the foreground,
i.e., the call to epiphany won't return before it's quit.
Now I type C-c in the terminal. I had expected that "Got SIGINT!" be
echoed but that doesn't happen. So what am I doing wrong? I've tried
the same with SIGTERM and SIGKILL.
I've also tried "kill -SIGINT <pid_of_fish_running_script>" and still
nothing was echoed, except that I got a message
Error receiving IPC message on socket 46 in process 2:
Connection reset by peer
in the terminal after closing epiphany.
My actual use-case is a script that will eventually call openconnect to
establish a VPN connection to my work network. During my work day, I'll
mount several samba shares from that network and usually I forget to
umount them before C-c-ing the script. Then the system shutdown will
hang because the system tries to umount them which won't work without
VPN connection. So I want some mechanism to umount those shares
_before_ the VPN connection is closed.
I'm running fish 3.1.2.
Thanks for any pointers,
Tassilo
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users