ofxIO icon indicating copy to clipboard operation
ofxIO copied to clipboard

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

Open stephanschulz opened this issue 6 years ago • 2 comments

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 avatar Oct 24 '19 18:10 stephanschulz

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.

bakercp avatar Oct 25 '19 03:10 bakercp

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.

stephanschulz avatar Oct 25 '19 12:10 stephanschulz