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 main(void)
  8. {
  9. int ret = getpriority(PRIO_PROCESS, 0);
  10. if(ret == -1) perror("getpriority: error");
  11. printf("getpriority: %d\n", ret);
  12. return 0;
  13. }