Add sh lock to work ex lock
This commit is contained in:
parent
8a85e3a2e4
commit
55c5991da3
|
@ -117,6 +117,9 @@ static bool ipcsend(char *exe, char *name,
|
||||||
flock(pp, LOCK_EX);
|
flock(pp, LOCK_EX);
|
||||||
fcntl(pp, F_SETFL, 0); //clear O_NONBLOCK to write len > 65536;
|
fcntl(pp, F_SETFL, 0); //clear O_NONBLOCK to write len > 65536;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
flock(pp, LOCK_SH);
|
||||||
|
|
||||||
ret = write(pp, line, len) == len;
|
ret = write(pp, line, len) == len;
|
||||||
close(pp);
|
close(pp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user