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

Run command stuck #21

Closed
avnerbarr opened this issue Jun 30, 2016 · 5 comments
Closed

Run command stuck #21

avnerbarr opened this issue Jun 30, 2016 · 5 comments

Comments

@avnerbarr
Copy link

I'm running in it seems to not do anything (it is a long running command but it seems to never finish)

If I run the command from the command line terminal it does complete

Is there a way to continually output the stdout (Not wait for the result)

let archiveCommand = "some command to run"
let res = run(archiveCommand) // never completing through my script

@nsomar
Copy link
Owner

nsomar commented Sep 27, 2016

I think that this was solved with #25
Could you please give it a try again and let me know :)?

I will close this, but please do reopen it if it persits

@nsomar nsomar closed this as completed Sep 27, 2016
@CraigSiemens
Copy link

I just ran into this same issue using master. For me, it was caused by ffmpeg thinking there was more input comping through stdin. I've found two possible solutions.

Run my script and close stdin with

myScript <&-

or in ActualTaskExecutor execute add

task.standardInput = FileHandle.nullDevice

@nsomar
Copy link
Owner

nsomar commented Nov 21, 2016

@CraigSiemens @avnerbarr I did refactor the process execution functionality in SwiftLine and extracted it to another library https://github.com/oarrabi/Runner

This new library is POSIX compliant, it uses posix_spawn under the hood, so it should provide more consistent behaviours.

It is functional, but still in working progress. I would love if you give it a try :)

@CraigSiemens
Copy link

I finally got around to giving Runner a try and it worked like a charm. Thanks!

@nsomar
Copy link
Owner

nsomar commented Dec 4, 2016

@CraigSiemens Thats awesome to hear :) thanks for trying it!

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

3 participants