summaryrefslogtreecommitdiff
path: root/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-13 19:02:19 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-13 19:02:19 +0200
commite1f5e051099d550ca6ed78539bf3e519656ef18a (patch)
treee9370234ee4b20a9b787c0bcaf7fc04406a4e955 /execute.c
parentc99b188ea0f6c4b0c63aa56c439df9bab16b7924 (diff)
execute: minor cleanups
Diffstat (limited to 'execute.c')
-rw-r--r--execute.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/execute.c b/execute.c
index bf9a087c05..5ac5eefd33 100644
--- a/execute.c
+++ b/execute.c
@@ -73,7 +73,7 @@ static int shift_fds(int fds[], unsigned n_fds) {
if ((nfd = fcntl(fds[i], F_DUPFD, i+3)) < 0)
return -errno;
- assert_se(close_nointr(fds[i]) == 0);
+ close_nointr_nofail(fds[i]);
fds[i] = nfd;
/* Hmm, the fd we wanted isn't free? Then
@@ -137,7 +137,7 @@ static int open_null_as(int flags, int nfd) {
if (fd != nfd) {
r = dup2(fd, nfd) < 0 ? -errno : nfd;
- close_nointr(fd);
+ close_nointr_nofail(fd);
} else
r = nfd;
@@ -191,7 +191,7 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
if (fd != nfd) {
r = dup2(fd, nfd) < 0 ? -errno : nfd;
- close_nointr(fd);
+ close_nointr_nofail(fd);
} else
r = nfd;
@@ -334,7 +334,6 @@ static int chown_terminal(int fd, uid_t uid) {
struct stat st;
assert(fd >= 0);
- assert(uid >= 0);
/* This might fail. What matters are the results. */
fchown(fd, uid, -1);