mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +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
|
@ -16,7 +16,9 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/struct/fd.internal.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/stdio/lock.internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
||||
/**
|
||||
|
@ -27,7 +29,11 @@ int scanf(const char *fmt, ...) {
|
|||
int rc;
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
rc = __vcscanf((int (*)(void *))fgetc, NULL, stdin, fmt, va);
|
||||
flockfile(stdin);
|
||||
rc = __vcscanf((void *)fgetc_unlocked, //
|
||||
(void *)ungetc_unlocked, //
|
||||
stdin, fmt, va);
|
||||
funlockfile(stdin);
|
||||
va_end(va);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue