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

using ofSystem() to call shell script is not working in directory watcher #27

Open
stephanschulz opened this issue Oct 24, 2019 · 2 comments

Comments

@stephanschulz
Copy link

stephanschulz commented Oct 24, 2019

I made a small app that can upload a text file calling a shell script.
https://github.com/antimodular/examples/tree/master/sftp_uploader

I was now hoping that my shell script calling can happen when your directory watcher notices a file change. But as soon as I add ofxIO and ofxPoco to the app ofSystem() hangs when running the script.

Would you know why?

@stephanschulz stephanschulz changed the title use ofSystem() call shell script not working in directory watcher using ofSystem() to call shell script is not working in directory watcher Oct 24, 2019
@bakercp
Copy link
Owner

bakercp commented Oct 25, 2019

I'm not exactly sure -- generally I don't use ofSystem() because it usually doesn't give me enough control. I prefer using https://pocoproject.org/docs/Poco.Process.html which gives you a handle to the process, io streams, etc, and makes it easier to do threading, event queuing etc.

@stephanschulz
Copy link
Author

Interesting.
I looked at it but it all seems very new to me.
Do you happen to have an example on how to call a system process (run shell script) via poco process?
I will continue looking in to this.
Thank you very much.

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

2 participants