Deleted Added
full compact
port-linux.c (255767) port-linux.c (294464)
1/* $Id: port-linux.c,v 1.18 2013/06/01 22:07:32 dtucker Exp $ */
2
3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
5 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

273 verbose("error reading %s: %s", oom_adj_path,
274 strerror(errno));
275 else {
276 rewind(fp);
277 if (fprintf(fp, "%d\n", value) <= 0)
278 verbose("error writing %s: %s",
279 oom_adj_path, strerror(errno));
280 else
1/* $Id: port-linux.c,v 1.18 2013/06/01 22:07:32 dtucker Exp $ */
2
3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
5 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

273 verbose("error reading %s: %s", oom_adj_path,
274 strerror(errno));
275 else {
276 rewind(fp);
277 if (fprintf(fp, "%d\n", value) <= 0)
278 verbose("error writing %s: %s",
279 oom_adj_path, strerror(errno));
280 else
281 verbose("Set %s from %d to %d",
281 debug("Set %s from %d to %d",
282 oom_adj_path, oom_adj_save, value);
283 }
284 fclose(fp);
285 return;
286 }
287 }
288 oom_adj_path = NULL;
289}

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

297 debug3("%s", __func__);
298 if (oom_adj_save == INT_MIN || oom_adj_path == NULL ||
299 (fp = fopen(oom_adj_path, "w")) == NULL)
300 return;
301
302 if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
303 verbose("error writing %s: %s", oom_adj_path, strerror(errno));
304 else
282 oom_adj_path, oom_adj_save, value);
283 }
284 fclose(fp);
285 return;
286 }
287 }
288 oom_adj_path = NULL;
289}

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

297 debug3("%s", __func__);
298 if (oom_adj_save == INT_MIN || oom_adj_path == NULL ||
299 (fp = fopen(oom_adj_path, "w")) == NULL)
300 return;
301
302 if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
303 verbose("error writing %s: %s", oom_adj_path, strerror(errno));
304 else
305 verbose("Set %s to %d", oom_adj_path, oom_adj_save);
305 debug("Set %s to %d", oom_adj_path, oom_adj_save);
306
307 fclose(fp);
308 return;
309}
310#endif /* LINUX_OOM_ADJUST */
311#endif /* WITH_SELINUX || LINUX_OOM_ADJUST */
306
307 fclose(fp);
308 return;
309}
310#endif /* LINUX_OOM_ADJUST */
311#endif /* WITH_SELINUX || LINUX_OOM_ADJUST */