system log to stderr

This commit is contained in:
Dun Liang 2021-05-14 12:36:20 +08:00
parent 5a66739efa
commit 21dad69e51
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************
__version__ = '1.2.3.1'
__version__ = '1.2.3.2'
from . import lock
with lock.lock_scope():
ori_int = int

View File

@ -311,8 +311,9 @@ int system_popen(const char* cmd) {
int64 len=0;
while (fgets(buf, BUFSIZ, ptr) != NULL) {
len += strlen(buf);
puts(buf);
std::cerr << buf;
}
if (len) std::cerr.flush();
auto ret = pclose(ptr);
if (len<10 && ret) {
// maybe overcommit