Merge branch 'pks-t/procps-pks/sysctl-handle-close-errors'
References: procps-ng/procps!65
This commit is contained in:
commit
6e8d124a3b
@ -48,13 +48,13 @@ the beginning of the file.
|
||||
.BR w [ <del> ]
|
||||
Open a file below
|
||||
.I /proc/##
|
||||
for writing even large buffers. The optional delimeter character
|
||||
for writing even large buffers. The optional delimiter character
|
||||
can be one of the follwoing
|
||||
.BR '\ ' ,\ ',' ,\ '.' ,\ and\ ':'
|
||||
where the default is the colon
|
||||
.BR ',' .
|
||||
This allows to split very large input lines into pieces at this
|
||||
delimeter and write each of them to the opened file below
|
||||
delimiter and write each of them to the opened file below
|
||||
.IR /proc/## .
|
||||
.TP
|
||||
.B e
|
||||
|
4
procio.c
4
procio.c
@ -249,9 +249,9 @@ ssize_t proc_write(void *c, const char *buf, size_t count)
|
||||
do {
|
||||
token = NULL;
|
||||
if (cookie->offset > LINELEN)
|
||||
token = (char*)memrchr(cookie->buf+offset, ',', LINELEN);
|
||||
token = (char*)memrchr(cookie->buf+offset, cookie->delim, LINELEN);
|
||||
else
|
||||
token = (char*)memrchr(cookie->buf+offset, '\n', LINELEN);
|
||||
token = (char*)memrchr(cookie->buf+offset, '\n', cookie->offset);
|
||||
if (token)
|
||||
*token = '\n';
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user