process.cc (14024:abe47b13653d) process.cc (14121:692af22d0737)
1/*
2 * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
3 * Copyright (c) 2012 ARM Limited
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 185 unchanged lines hidden (view full) ---

194 } else {
195 /**
196 * Copy the file descriptors from the old process into the new
197 * child process. The file descriptors entry can be opened and
198 * closed independently of the other process being considered. The
199 * host file descriptors are also dup'd so that the flags for the
200 * host file descriptor is independent of the other process.
201 */
1/*
2 * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
3 * Copyright (c) 2012 ARM Limited
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 185 unchanged lines hidden (view full) ---

194 } else {
195 /**
196 * Copy the file descriptors from the old process into the new
197 * child process. The file descriptors entry can be opened and
198 * closed independently of the other process being considered. The
199 * host file descriptors are also dup'd so that the flags for the
200 * host file descriptor is independent of the other process.
201 */
202 std::shared_ptr<FDArray> nfds = np->fds;
202 for (int tgt_fd = 0; tgt_fd < fds->getSize(); tgt_fd++) {
203 for (int tgt_fd = 0; tgt_fd < fds->getSize(); tgt_fd++) {
203 std::shared_ptr<FDArray> nfds = np->fds;
204 std::shared_ptr<FDEntry> this_fde = (*fds)[tgt_fd];
205 if (!this_fde) {
206 nfds->setFDEntry(tgt_fd, nullptr);
207 continue;
208 }
209 nfds->setFDEntry(tgt_fd, this_fde->clone());
210
211 auto this_hbfd = std::dynamic_pointer_cast<HBFDEntry>(this_fde);

--- 336 unchanged lines hidden ---
204 std::shared_ptr<FDEntry> this_fde = (*fds)[tgt_fd];
205 if (!this_fde) {
206 nfds->setFDEntry(tgt_fd, nullptr);
207 continue;
208 }
209 nfds->setFDEntry(tgt_fd, this_fde->clone());
210
211 auto this_hbfd = std::dynamic_pointer_cast<HBFDEntry>(this_fde);

--- 336 unchanged lines hidden ---