5
5
* Copyright (C) 2007 The Regents of the University of California.
6
6
* Written by Don Albert <Don.Albert@Bull.com> and
7
7
* Morris Jette <jette1@llnl.gov>
8
* CODE-OCEC-09-009. All rights reserved.
10
10
* This file is part of SLURM, a resource management program.
11
* For details, see <http://www.llnl.gov/linux/slurm/>.
11
* For details, see <https://computing.llnl.gov/linux/slurm/>.
12
* Please also read the included file: DISCLAIMER.
13
14
* SLURM is free software; you can redistribute it and/or modify it under
14
15
* the terms of the GNU General Public License as published by the Free
99
100
fd = open(file_path, O_RDONLY);
101
102
error("open(%s): %m", file_path);
103
rc = read(fd, mstr, sizeof(mstr));
106
error("read(%s): %m", file_path);
107
snprintf(file_path, sizeof(file_path), "%s/mems", path);
108
fd = open(file_path, O_CREAT | O_WRONLY, 0700);
110
error("open(%s): %m", file_path);
113
rc = write(fd, mstr, rc);
116
error("write(%s): %m", file_path);
105
rc = read(fd, mstr, sizeof(mstr));
108
error("read(%s): %m", file_path);
111
snprintf(file_path, sizeof(file_path), "%s/mems", path);
112
fd = open(file_path, O_CREAT | O_WRONLY, 0700);
114
error("open(%s): %m", file_path);
117
rc = write(fd, mstr, rc);
120
error("write(%s): %m", file_path);
119
124
/* Delete cpuset once its tasks complete.
170
179
rc = read(fd, mstr, sizeof(mstr));
173
182
error("read(%s): %m", file_path);
174
185
snprintf(file_path, sizeof(file_path), "%s/mems", path);
175
186
fd = open(file_path, O_CREAT | O_WRONLY, 0700);
180
191
rc = write(fd, mstr, rc);
183
194
error("write(%s): %m", file_path);
186
199
/* Delete cpuset once its tasks complete.
267
280
int fd, i, max_node;
270
snprintf(file_path, sizeof(file_path), "%s/mems", CPUSET_DIR);
271
fd = open(file_path, O_CREAT | O_RDONLY, 0700);
283
snprintf(file_path, sizeof(file_path), "%s/mems", path);
284
fd = open(file_path, O_CREAT | O_RDWR, 0700);
273
286
error("open(%s): %m", file_path);