logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

getpriority.c (414B)


  1. // utils-std: Collection of commonly available Unix tools
  2. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. // SPDX-License-Identifier: MPL-2.0
  4. #define _POSIX_C_SOURCE 202405L
  5. #include <stdio.h>
  6. #include <sys/resource.h>
  7. int
  8. main(void)
  9. {
  10. int ret = getpriority(PRIO_PROCESS, 0);
  11. if(ret == -1) perror("getpriority: error");
  12. printf("getpriority: %d\n", ret);
  13. return 0;
  14. }