aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-26 15:45:17 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-26 15:45:17 +0000
commitdd16e0325070225462e98088574fd17defad0ae0 (patch)
treeaf6c1681e91a3e5c13bf3dce8aa798c07462468a /runit
parent48a92503e79c2345601821c4599ee25d1db35d66 (diff)
downloadbusybox-w32-dd16e0325070225462e98088574fd17defad0ae0.tar.gz
busybox-w32-dd16e0325070225462e98088574fd17defad0ae0.tar.bz2
busybox-w32-dd16e0325070225462e98088574fd17defad0ae0.zip
small fixes:
fix xstrdup to not grossly overallocate memory use xopen instean of xopen3 in several places etc. git-svn-id: svn://busybox.net/trunk/busybox@16673 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index b2fbe5167..7024c3db4 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -148,19 +148,19 @@ static unsigned processorstart(struct logdir *ld)
148 if (fd_move(0, fd) == -1) 148 if (fd_move(0, fd) == -1)
149 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name); 149 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name);
150 ld->fnsave[26] = 't'; 150 ld->fnsave[26] = 't';
151 fd = xopen3(ld->fnsave, O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT, 0644); 151 fd = xopen(ld->fnsave, O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT);
152 if (fd_move(1, fd) == -1) 152 if (fd_move(1, fd) == -1)
153 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name); 153 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name);
154 fd = open_read("state"); 154 fd = open_read("state");
155 if (fd == -1) { 155 if (fd == -1) {
156 if (errno != ENOENT) 156 if (errno != ENOENT)
157 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "open state for", ld->name); 157 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "open state for", ld->name);
158 close(xopen3("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT, 0644)); 158 close(xopen("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT));
159 fd = xopen("state", O_RDONLY|O_NDELAY); 159 fd = xopen("state", O_RDONLY|O_NDELAY);
160 } 160 }
161 if (fd_move(4, fd) == -1) 161 if (fd_move(4, fd) == -1)
162 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name); 162 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name);
163 fd = xopen3("newstate", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT, 0644); 163 fd = xopen("newstate", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT);
164 if (fd_move(5, fd) == -1) 164 if (fd_move(5, fd) == -1)
165 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name); 165 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "move filedescriptor for", ld->name);
166 166