process.h 993 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
  3. * All rights reserved.
  4. * This component and the accompanying materials are made available
  5. * under the terms of the License "Eclipse Public License v1.0"
  6. * which accompanies this distribution, and is available
  7. * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. *
  9. * Initial Contributors:
  10. * Nokia Corporation - initial contribution.
  11. *
  12. * Contributors:
  13. *
  14. * Description:
  15. *
  16. */
  17. /*
  18. * Process.h
  19. */
  20. #ifndef _TALONPROCESS_H_
  21. #define _TALONPROCESS_H_
  22. #include <sys/types.h>
  23. #include "buffer.h"
  24. typedef pid_t proc_handle;
  25. #define PROC_NORMALDEATH 0
  26. #define PROC_TIMEOUTDEATH 1
  27. #define PROC_SOMEODDDEATH 2
  28. #define PROC_PIPECREATE 3
  29. #define PROC_STARTPROC 4
  30. typedef struct
  31. {
  32. proc_handle pid;
  33. unsigned int starttime;
  34. unsigned int endtime;
  35. int returncode;
  36. unsigned int causeofdeath;
  37. buffer *output;
  38. } proc;
  39. proc *process_run(char executable[], char *args[], int timeout);
  40. void process_free(proc **pp);
  41. #endif