Jump to content

How to use custom binaries in Alfred workflows?


Recommended Posts

Posted

I am trying to use a custom binary in a Script Filter. So far, there is only one issue: When I activate the script filter, the binary is called. If I close Alfred before the binary process terminates, that process begins to steal all of my RAM, as if in an infinite loop. Normally, it runs around 500KB of RAM for a split second; when improperly terminated, it will take up to 2GB until I quit the process with Activity Monitor.

 

My script filter contains this code:

./binary "#{query}"

How can I prevent the process from going haywire every time Alfred closes before the execution completes?

 

(I do have access to the source code, if needed.)

Posted

I am trying to use a custom binary in a Script Filter. So far, there is only one issue: When I activate the script filter, the binary is called. If I close Alfred before the binary process terminates, that process begins to steal all of my RAM, as if in an infinite loop. Normally, it runs around 500KB of RAM for a split second; when improperly terminated, it will take up to 2GB until I quit the process with Activity Monitor.

 

My script filter contains this code:

./binary "#{query}"

How can I prevent the process from going haywire every time Alfred closes before the execution completes?

 

(I do have access to the source code, if needed.)

 

Could you share it or at least tell me what the app does? Perhaps it's something I could try and see if I have the same results

Posted

Could you share it or at least tell me what the app does? Perhaps it's something I could try and see if I have the same results

 

I made some changes to my code and the problem went away. Alfred lets script filter processes finish, regardless of whether their output will be used. It seems to be pure coincidence that the process went haywire at the same time Alfred closed. The issue is resolved.

 

I'll release the source code later, at the same time the workflow becomes available ;)

 

Cheers :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...