Fix bug #9586 - smbd[29175]: disk_free: sys_popen() failed" message logged in /var...
authorJeremy Allison <jra@samba.org>
Wed, 23 Jan 2013 22:39:09 +0000 (14:39 -0800)
committerVolker Lendecke <vl@samba.org>
Thu, 24 Jan 2013 09:45:48 +0000 (10:45 +0100)
Ensure when reading lines from an interruptible
pipe source we ignore EINTR.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 24 10:45:48 CET 2013 on sn-devel-104

source3/lib/util_file.c

index 50ff844762446e462452d23df56bc5b94d4a05a8..8319f04a0930278e66470ccf3c30e3ed1e9e255f 100644 (file)
@@ -38,7 +38,7 @@ static char *file_pload(const char *syscmd, size_t *size)
        p = NULL;
        total = 0;
 
-       while ((n = read(fd, buf, sizeof(buf))) > 0) {
+       while ((n = sys_read(fd, buf, sizeof(buf))) > 0) {
                p = talloc_realloc(NULL, p, char, total + n + 1);
                if (!p) {
                        DEBUG(0,("file_pload: failed to expand buffer!\n"));