Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not properly kill the executable on rebuild in Windows #172

Open
cameracker opened this issue Apr 5, 2018 · 7 comments
Open

Does not properly kill the executable on rebuild in Windows #172

cameracker opened this issue Apr 5, 2018 · 7 comments

Comments

@cameracker
Copy link

cameracker commented Apr 5, 2018

On windows when realize detects that a file has been modified, it will correctly trigger a rebuild, but it is not guaranteed to kill the executable prior to the rebuild. If the executable has bound to network sockets, then this results in an error when the tool auto rebuilds:

image

Is there a work around available for this?

@cameracker
Copy link
Author

cameracker commented Apr 5, 2018

The configuration for my run command is nothing really special, it looks like

schema:
- name: ...
  path: .
  commands:
    build:
      status: true
      dir: cmd/exec
    run:
      status: true
      dir: cmd/exec

Is there an additional option i need to put here for like a prerun that will kill the process?

@cameracker
Copy link
Author

Could it be related to this? golang/go#22381

@asoseil
Copy link
Contributor

asoseil commented Apr 6, 2018

Hi Cameron, probably is related to golang/go#22381 but i'll make some test to confirm that

@cameracker
Copy link
Author

Thanks for the follow up @asoseil :)

We worked around it by introducing a before command that does:

scripts:
- type: before
  command: taskkill /im [executable].exe /F

But we're looking forward to getting rid of the hook hahah

@vincentri
Copy link

Any update?

@ayush987goyal
Copy link

The issue still persists with the latest version. Any update on the this?

@sumia01
Copy link

sumia01 commented Oct 9, 2018

Here is the solution, until it's merged to master use this on windows.
#208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants