lib/fusuma/plugin/appmatcher/user_switcher.rb in fusuma-plugin-appmatcher-0.2.3 vs lib/fusuma/plugin/appmatcher/user_switcher.rb in fusuma-plugin-appmatcher-0.3.0

- old
+ new

@@ -28,10 +28,12 @@ Process::Sys.setuid(user.uid) end # Execute the provided block in a child process as the specified user # The parent blocks until the child finishes. - def as_user(user = @login_user) + def as_user(user = @login_user, proctitle:) + self.proctitle = "#{self.class.name.underscore}(#{user.username}) -> #{proctitle}" + fork do drop_priv(user) yield(user) if block_given? end end