A turning gear appears when I run this workflow, why?

I am running the following script (called Restart AppleTV) using automator :

on run {input, parameters}

  do shell script "sudo killall coreaudiod" with administrator privileges

  return input
end run

However, I get the following in the statusbar :

enter image description here

The terminal code DOES run, but the gear never disappears unless I manually click the x button .. How can I get rid of this automatically or prevent it from appearing in the first place ?

--Note : This only happens when I run it by double clicking the exported .app file, but not when I run the code through automator.


Try:

on run {input, parameters}
    set myPassword to "My Password"

    ignoring application responses
        do shell script "sudo killall coreaudiod" password myPassword with administrator privileges
    end ignoring
end run

OR

on run {input, parameters}
    set myPassword to "My Password"

    ignoring application responses
        do shell script "sudo killall coreaudiod &>/dev/null &" password myPassword with administrator privileges
    end ignoring
end run

adayzdone's suggestion to route output to dev/null also fixed the spinning gear that was appearing when I used Automator to run Firefox profiles.

So, something like this in a shell script:

/Applications/Firefox.app/Contents/MacOS/firefox-bin -P 'Web Dev' -no-remote &>/dev/null &

Thanks!