mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Add i/o statistics to wait4() about child process
This commit is contained in:
parent
b9eb656e41
commit
58ef4e6df8
6 changed files with 39 additions and 8 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/stdio/lock.internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
||||
/**
|
||||
|
@ -24,5 +25,11 @@
|
|||
* @see libc/fmt/vcscanf.h
|
||||
*/
|
||||
int vfscanf(FILE *stream, const char *fmt, va_list ap) {
|
||||
return __vcscanf((void *)fgetc, (void *)ungetc, stream, fmt, ap);
|
||||
int rc;
|
||||
flockfile(stream);
|
||||
rc = __vcscanf((void *)fgetc_unlocked, //
|
||||
(void *)ungetc_unlocked, //
|
||||
stream, fmt, ap);
|
||||
funlockfile(stream);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue