You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Lou DeGenaro (JIRA)" <de...@uima.apache.org> on 2014/04/30 18:00:15 UTC
[jira] [Updated] (UIMA-3498) DUCC webserver (WS) improved use of
/bin/cat
[ https://issues.apache.org/jira/browse/UIMA-3498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lou DeGenaro updated UIMA-3498:
-------------------------------
Fix Version/s: (was: 1.1.0-Ducc)
> DUCC webserver (WS) improved use of /bin/cat
> --------------------------------------------
>
> Key: UIMA-3498
> URL: https://issues.apache.org/jira/browse/UIMA-3498
> Project: UIMA
> Issue Type: Improvement
> Components: DUCC
> Reporter: Lou DeGenaro
> Assignee: Lou DeGenaro
> Priority: Minor
>
> In AlienFile.java, follow the recipe provided by Burn below:
> // Run process and log all output
> ProcessBuilder pb = new ProcessBuilder(args);
> pb.redirectErrorStream(true);
> Process p = pb.start();
> BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
> String line = in.readLine();
> while (line != null) {
> if (outStream == null) {
> logger.log(Level.INFO, "[" + id + "] " + line);
> } else {
> outStream.println(line);
> }
> line = in.readLine();
> }
> in.close();
> if (outStream != null) {
> outStream.close();
> }
> rc = p.waitFor();
> if (rc != 0 && outStream != null) {
--
This message was sent by Atlassian JIRA
(v6.2#6252)