db_process.c 2.3 KB

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