diff --git a/src/event/workqueue.c b/src/event/workqueue.c index 8f24194d6..ceb17ca5a 100644 --- a/src/event/workqueue.c +++ b/src/event/workqueue.c @@ -167,7 +167,7 @@ _dispatch_workq_count_runnable_workers(dispatch_workq_monitor_t mon) if (bytes_read > 0) { buf[bytes_read] = '\0'; char state; - if (sscanf(buf, "%*d %*s %c", &state) == 1) { + if (sscanf(strrchr(buf, ')') + 2, "%c", &state) == 1) { // _dispatch_debug("workq: Worker %d, state %c\n", tid, state); if (state == 'R') { running_count++;