-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
The PAL_HANDLE_FD_HANG_UP/PAL_WAIT_HANG_UP events correspond to normal POSIX POLLHUP events (hang up, e.g. in case of a pipe/stream socket when one end of the channel was shutdown).
Currently the VM PALs never return these events, instead they simply return PAL_HANDLE_FD_ERROR/PAL_WAIT_ERROR.
See related code:
gramine-tdx/pal/src/host/vm-common/pal_common_object.c
Lines 66 to 71 in f4405d3
if (!pipe_buf->readable && !pipe_buf->writable) { /* pipe was shutdown */ handle->flags |= PAL_HANDLE_FD_ERROR; /* TODO: maybe PAL_HANDLE_FD_HANG_UP? */ revents = PAL_WAIT_ERROR; /* TODO: maybe PAL_WAIT_HANG_UP? */ goto out; } gramine-tdx/pal/src/host/vm-common/pal_common_object.c
Lines 103 to 110 in f4405d3
long peeked = virtio_vsock_peek(handle->sock.fd); if (peeked < 0) { /* socket is invalid or was shutdown or in the process of closing */ handle->flags |= PAL_HANDLE_FD_ERROR; *out_events = PAL_WAIT_ERROR; spinlock_unlock(&handle->sock.lock); return 0; }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels