src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c

Print this page
rev 11622 : 8071687: AIX port of "8039173: Propagate errors from Diagnostic Commands as exceptions in the attach framework"

*** 1,8 **** /* ! * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. ! * Copyright 2014 SAP AG. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,8 ---- /* ! * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. ! * Copyright 2015 SAP AG. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 236,253 **** size_t remaining = (size_t)(baLen - off); if (len > remaining) { len = remaining; } ! RESTARTABLE(read(fd, buf+off, len), n); if (n == -1) { JNU_ThrowIOExceptionWithLastError(env, "read"); } else { if (n == 0) { n = -1; // EOF } else { ! (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf+off)); } } return n; } --- 236,253 ---- size_t remaining = (size_t)(baLen - off); if (len > remaining) { len = remaining; } ! RESTARTABLE(read(fd, buf, len), n); if (n == -1) { JNU_ThrowIOExceptionWithLastError(env, "read"); } else { if (n == 0) { n = -1; // EOF } else { ! (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf)); } } return n; }