M
Moritz Reiter
Hi,
I want to invoke a shell command from within ruby but as another user in
a Linux environment. I start the ruby script itself as root and in the
script I do something like this:
%x{su some_user -c "some_command"}
some_more_ruby_stuff
The problem is: 'some_command' gets successfully executed, but the ruby
script seems to never return to normal operation. 'some_more_ruby_stuff'
gets never executed.
Could anyone tell me why this happens and maybe what I could do about it?
Regards,
Moritz
I want to invoke a shell command from within ruby but as another user in
a Linux environment. I start the ruby script itself as root and in the
script I do something like this:
%x{su some_user -c "some_command"}
some_more_ruby_stuff
The problem is: 'some_command' gets successfully executed, but the ruby
script seems to never return to normal operation. 'some_more_ruby_stuff'
gets never executed.
Could anyone tell me why this happens and maybe what I could do about it?
Regards,
Moritz