chiark / gitweb /
Revert "socket: add support for TCP fast Open"
[elogind.git] / src / login / test-inhibit.c
index 70b8314e3f8481d47600804891e89e38c5d56ef7..21d233961615a319e3be5a00d5a0fa1d80f8fb1e 100644 (file)
@@ -73,8 +73,8 @@ static void print_inhibitors(sd_bus *bus) {
         assert(r >= 0);
 
         while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) {
-                printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<%lu> pid=<%lu>\n",
-                       what, who, why, mode, (unsigned long) uid, (unsigned long) pid);
+                printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<"UID_FMT"> pid=<"PID_FMT">\n",
+                       what, who, why, mode, uid, pid);
 
                 n++;
         }
@@ -101,11 +101,11 @@ int main(int argc, char*argv[]) {
         assert(fd2 >= 0);
         print_inhibitors(bus);
 
-        close_nointr_nofail(fd1);
+        safe_close(fd1);
         sleep(1);
         print_inhibitors(bus);
 
-        close_nointr_nofail(fd2);
+        safe_close(fd2);
         sleep(1);
         print_inhibitors(bus);