Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle door_return errors #25

Open
robertdfrench opened this issue Apr 20, 2023 · 0 comments
Open

Handle door_return errors #25

robertdfrench opened this issue Apr 20, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@robertdfrench
Copy link
Owner

According to DOOR_RETURN(3C), door_return can actually fail and return to the calling process in certain situations:

   Upon successful completion, door_return() does not return to the calling
   process. Otherwise, door_return() returns -1 to the calling process and
   sets errno to indicate the error.

   ...

   The door_return() function fails and returns to the calling process if:

   E2BIG
             Arguments were too big for client.


   EFAULT
             The address of data_ptr or desc_ptr is invalid.


   EINVAL
             Invalid door_return() arguments were passed or a thread is
             bound to a door that no longer exists.


   EMFILE
             The client has too many open descriptors.

So! It would be neat to be able to turn this into a function that produces a Result type

@robertdfrench robertdfrench added this to the Error-handling API milestone Apr 20, 2023
@robertdfrench robertdfrench added the enhancement New feature or request label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant