1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 03:45:35 +02:00

[448400] [dstore] automatically fallback to exec(hostname) if no

hostname detected and print message if needed
This commit is contained in:
Dave McKnight 2014-10-22 12:43:27 -04:00
parent 0103923695
commit d74dc7aaf8

View file

@ -96,6 +96,7 @@ public class ServerAttributes extends DataStoreAttributes
}
if (hostname == null){
// fall back to reading hostname from shell
System.err.println("The server can not resolve the hostname so falling back to reading hostname from the console.");
try {
Process p = Runtime.getRuntime().exec("hostname"); //$NON-NLS-1$
InputStream inStream = p.getInputStream();