mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 09:18:31 +00:00
Polish recent changes and make improvements
- Simulate SIGPIPE on Windows NT - Fix commandv() regression on Windows NT - Fix sigprocmask() strace bug on OpenBSD - Add many more system calls to --strace logging - Make errno state more pristine in redbean strace
This commit is contained in:
parent
10a766ebd0
commit
39688a73e4
69 changed files with 460 additions and 1976 deletions
|
@ -28,18 +28,21 @@
|
|||
* @asyncsignalsafe
|
||||
*/
|
||||
int __zipos_stat(const struct ZiposUri *name, struct stat *st) {
|
||||
int rc;
|
||||
ssize_t cf;
|
||||
struct Zipos *zipos;
|
||||
if (!st) return efault();
|
||||
if ((zipos = __zipos_get())) {
|
||||
if ((cf = __zipos_find(zipos, name)) != -1) {
|
||||
return __zipos_stat_impl(zipos, cf, st);
|
||||
if (st) {
|
||||
if ((zipos = __zipos_get())) {
|
||||
if ((cf = __zipos_find(zipos, name)) != -1) {
|
||||
rc = __zipos_stat_impl(zipos, cf, st);
|
||||
} else {
|
||||
rc = enoent();
|
||||
}
|
||||
} else {
|
||||
ZTRACE("__zipos_stat(%.*s) -> enoent", name->len, name->path);
|
||||
return enoent();
|
||||
rc = enoexec();
|
||||
}
|
||||
} else {
|
||||
ZTRACE("__zipos_stat(%.*s) → enoexec", name->len, name->path);
|
||||
return enoexec();
|
||||
rc = efault();
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue