selinux/restorecond
Nicolas Iooss 04fb15deb7 restorecond: check write() and daemon() results
When compiling restorecond with -Wunused, gcc 4.8.4 (from Ubuntu 14.04)
reports the following warnings:

    restorecond.c: In function ‘main’:
    restorecond.c:208:9: error: ignoring return value of ‘daemon’,
    declared with attribute warn_unused_result [-Werror=unused-result]
       daemon(0, 0);
             ^

    restorecond.c: In function ‘write_pid_file’:
    restorecond.c:106:2: error: ignoring return value of ‘write’,
    declared with attribute warn_unused_result [-Werror=unused-result]
      (void)write(pidfd, val, (unsigned int)len);
      ^

If any of these calls returns an error, it is currently silently
discarded. Add a message in order to warn about such an error.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2017-09-05 12:37:29 -04:00
..
.gitignore restorecond: Add gitignore 2016-11-16 11:20:05 -05:00
COPYING Add COPYING files for new subdirs. 2016-11-16 11:19:51 -05:00
Makefile Makefiles: override *FLAGS and *LIBS 2017-06-20 12:15:04 -04:00
org.selinux.Restorecond.service Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restore.c restorecond: break source dependency on policycoreutils/setfiles 2016-11-16 11:19:51 -05:00
restore.h restorecond: break source dependency on policycoreutils/setfiles 2016-11-16 11:19:51 -05:00
restorecond_user.conf Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restorecond.8 Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restorecond.c restorecond: check write() and daemon() results 2017-09-05 12:37:29 -04:00
restorecond.conf Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restorecond.desktop Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restorecond.h restorecond: add noreturn attribute to exitApp() 2017-03-07 14:00:16 -05:00
restorecond.init Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
restorecond.service Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
stringslist.c Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
stringslist.h Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
user.c Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
utmpwatcher.c Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
utmpwatcher.h Move policycoreutils/restorecond to restorecond. 2016-11-16 11:19:50 -05:00
VERSION Update VERSION files for 2.7 release. 2017-08-04 09:31:00 -04:00
watch.c policycoreutils/restorecond: Decrease loglevel of termination message 2017-01-06 14:06:40 -05:00