It will be nearly impossible for me use an API. There is a lot of legacy code surrounding this snippet. Is it possible to redirect STDERR to STDOUT and do a pattern match on the phrases I would want to send "yes" to, will that work? My other question is - once STDERR has something in it, does the process continue? I tried just sending "yes" to the input after every line, however, my program still hung after a bit. Almost like once STDERR had something in it, STDOUT got nothing, and thus, the snapshot update also stopped.