File: 61-replace_plain_write.patch

package info (click to toggle)
ifhp 3.5.20%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,140 kB
  • sloc: ansic: 15,055; sh: 11,983; perl: 1,461; makefile: 485; sed: 16
file content (20 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Colin Watson <cjwatson@ubuntu.com>
Description: Parch to use Write_fd_str/Write_fd_len rather than plain write when writing the status file.
Forwarded: no  upstream exists anylonger

--- ifhp-3.5.20.orig/src/errormsg.c
+++ ifhp-3.5.20/src/errormsg.c
@@ -539,11 +539,11 @@ void setstatus( char *msg, char *details
 					buffer[n] = 0;
 					if( (s = strchr(buffer,'\n')) ){
 						*s++ = 0;
-						write(temp_fd, s,strlen(s));
+						Write_fd_str(temp_fd, s);
 					}
 				}
 				while( (n = read(Status_fd, buffer,sizeof(buffer)-1)) > 0 ){
-					write(temp_fd, buffer,n);
+					Write_fd_len(temp_fd, buffer,n);
 				}
 				close( Status_fd );
 				close( temp_fd );