def trap_signals(*signames)
            signames.map { |n| n.to_s.upcase }.map { |n| n.start_with?("SIG") ? n[3..-1] : n }.select do |signame|
                next false unless respond_sigmethod?(sigmethod(signame)) && signo = Signal.list[signame]

                next true if (prev = Signal.trap(signo) { |signo| send_signal(signo) }) == "DEFAULT"

                Signal.trap(signo,prev)
                false
            end
        end
def trap_signals(*signames)
            signames.map { |n| n.to_s.upcase }.map { |n| n.start_with?("SIG") ? n[3..-1] : n }.select do |signame|
                next false unless respond_sigmethod?(sigmethod(signame)) && signo = Signal.list[signame]

                next true if (prev = Signal.trap(signo) { |signo| send_signal(signo) }) == "DEFAULT"

                Signal.trap(signo,prev)
                false
            end
        end
Set traps

 The filesystem supports a signal by providing a `sig<name>` method. eg {#sigint}

 The fuse {#loop} is notified of the signal via the self-pipe trick, and calls the corresponding
   `sig<name>` method, after any current filesystem operation completes.

 This method will not override traps that have previously been set to something other than "DEFAULT"

 Note: {Fuse} itself provides {#sigterm} and {#sigint}.

 @param [Array<String>] signames
   List of signal names to set traps for, if the filesystem has methods to handle them.
   Use `Signal.list.keys` to try all available signals.

 @return [Array<String>] List of signal names that traps have been set for.

 @since 1.1.0

 @example
   class MyFS < Fuse
      def sighup()
          # do something on HUP signal
      end
   end

   fuse = MyFS.new(*args)

   if fuse.mounted?
       # Below will result in (effectively) Signal.trap("HUP") { fuse.sighup() }
       fuse.trap_signals("HUP","USR1") # ==> ["HUP"]
       fuse.loop()
   end