db_process.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2014 Stony Brook University
  2. This file is part of Graphene Library OS.
  3. Graphene Library OS is free software: you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public License
  5. as published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. Graphene Library OS is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /*
  14. * db_process.c
  15. *
  16. * This source file contains functions to create a child process and terminate the running process.
  17. * Child does not inherit any objects or memory from its parent process. A parent process may not
  18. * modify the execution of its children. It can wait for a child to exit using its handle. Also,
  19. * parent and child may communicate through I/O streams provided by the parent to the child at
  20. * creation.
  21. */
  22. #include "api.h"
  23. #include "pal.h"
  24. #include "pal_debug.h"
  25. #include "pal_defs.h"
  26. #include "pal_error.h"
  27. #include "pal_internal.h"
  28. int _DkProcessCreate(PAL_HANDLE* handle, const char* uri, const char** args) {
  29. return -PAL_ERROR_NOTIMPLEMENTED;
  30. }
  31. noreturn void _DkProcessExit(int exitcode) {
  32. while (true) {
  33. /* nothing */;
  34. }
  35. }
  36. static int64_t proc_read(PAL_HANDLE handle, uint64_t offset, uint64_t count, void* buffer) {
  37. return -PAL_ERROR_NOTIMPLEMENTED;
  38. }
  39. static int64_t proc_write(PAL_HANDLE handle, uint64_t offset, uint64_t count, const void* buffer) {
  40. return -PAL_ERROR_NOTIMPLEMENTED;
  41. }
  42. static int proc_close(PAL_HANDLE handle) {
  43. return -PAL_ERROR_NOTIMPLEMENTED;
  44. }
  45. struct handle_ops proc_ops = {
  46. .read = &proc_read,
  47. .write = &proc_write,
  48. .close = &proc_close,
  49. };