When i try system 'bash -ic'
, and terminate it in terminal, I stuck, following is my code
# ~/.bashrc
alias sv='sudo service'
# ex.rb
system "bash -ic 'sv'"
sleep
# in terminal, hit ctrl+c, it stuck
But when i try following code, it doesn't stuck
system "bash -ic 'source ~/.bashrc; sv'"
sleep
# in terminal, hit ctrl+c, it doesn't stuck
I reproduce my question in screencast
my question is why does it stuck?
update
here is my bashrc