diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-22 02:36:51 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-22 02:36:51 -0700 |
commit | 862c5bd6ddc794e658770cfe5283e2833e70712f (patch) | |
tree | c3265a7d54a11d60f6483c17fd84025478f79423 | |
parent | 690c0717a0b789c8914e49370fabed1dc3e75fd5 (diff) | |
download | mpd-862c5bd6ddc794e658770cfe5283e2833e70712f.tar.gz mpd-862c5bd6ddc794e658770cfe5283e2833e70712f.tar.xz mpd-862c5bd6ddc794e658770cfe5283e2833e70712f.zip |
Remove EINTR checking for open(2)
open(2) should only interrupt on "slow" devices, afaik...
-rw-r--r-- | src/directory.c | 3 | ||||
-rw-r--r-- | src/state_file.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/directory.c b/src/directory.c index 08b594105..fa0856dc5 100644 --- a/src/directory.c +++ b/src/directory.c @@ -967,8 +967,7 @@ int writeDirectoryDB(void) DEBUG("writing DB\n"); - while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) && - errno == EINTR); + fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT, 0666); if (fd < 0) { ERROR("unable to write to db file \"%s\": %s\n", dbFile, strerror(errno)); diff --git a/src/state_file.c b/src/state_file.c index 365baec0f..d6dba0f6e 100644 --- a/src/state_file.c +++ b/src/state_file.c @@ -55,8 +55,7 @@ void write_state_file(void) if (!sfpath) return; - while (((fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) && - errno == EINTR); + fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT, 0666); if (fd < 0) { ERROR("problems opening state file \"%s\" for writing: %s\n", sfpath, strerror(errno)); |