fspr_arch_threadproc.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include "fspr_private.h"
  17. #include "fspr_thread_proc.h"
  18. #include "fspr_file_io.h"
  19. #ifndef THREAD_PROC_H
  20. #define THREAD_PROC_H
  21. #define SHELL_PATH "cmd.exe"
  22. struct fspr_thread_t {
  23. fspr_pool_t *pool;
  24. HANDLE td;
  25. fspr_int32_t cancel;
  26. fspr_int32_t cancel_how;
  27. void *data;
  28. fspr_thread_start_t func;
  29. fspr_status_t exitval;
  30. };
  31. struct fspr_threadattr_t {
  32. fspr_pool_t *pool;
  33. fspr_int32_t detach;
  34. fspr_size_t stacksize;
  35. int priority;
  36. };
  37. struct fspr_threadkey_t {
  38. fspr_pool_t *pool;
  39. DWORD key;
  40. };
  41. struct fspr_procattr_t {
  42. fspr_pool_t *pool;
  43. fspr_file_t *parent_in;
  44. fspr_file_t *child_in;
  45. fspr_file_t *parent_out;
  46. fspr_file_t *child_out;
  47. fspr_file_t *parent_err;
  48. fspr_file_t *child_err;
  49. char *currdir;
  50. fspr_int32_t cmdtype;
  51. fspr_int32_t detached;
  52. fspr_child_errfn_t *errfn;
  53. fspr_int32_t errchk;
  54. #ifndef _WIN32_WCE
  55. HANDLE user_token;
  56. LPSECURITY_ATTRIBUTES sa;
  57. LPVOID sd;
  58. #endif
  59. };
  60. struct fspr_thread_once_t {
  61. long value;
  62. };
  63. #endif /* ! THREAD_PROC_H */