spawn.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef GRASS_SPAWN_H
  2. #define GRASS_SPAWN_H
  3. #include <sys/types.h>
  4. #include <sys/stat.h>
  5. #include <unistd.h>
  6. #include <fcntl.h>
  7. #define SF_MODE_IN ((const char *) (O_RDONLY))
  8. #define SF_MODE_OUT ((const char *) (O_WRONLY|O_CREAT|O_TRUNC))
  9. #define SF_MODE_APPEND ((const char *) (O_WRONLY|O_CREAT|O_APPEND))
  10. #define SF_STDIN ((const char *) STDIN_FILENO)
  11. #define SF_STDOUT ((const char *) STDOUT_FILENO)
  12. #define SF_STDERR ((const char *) STDERR_FILENO)
  13. #define SF_REDIRECT_FILE ((const char *) 1)
  14. #define SF_REDIRECT_DESCRIPTOR ((const char *) 2)
  15. #define SF_CLOSE_DESCRIPTOR ((const char *) 3)
  16. #define SF_SIGNAL ((const char *) 4)
  17. #define SF_VARIABLE ((const char *) 5)
  18. #define SF_BINDING ((const char *) 6)
  19. #define SF_BACKGROUND ((const char *) 7)
  20. #define SF_DIRECTORY ((const char *) 8)
  21. #define SF_ARGVEC ((const char *) 9)
  22. enum signal_action
  23. {
  24. SSA_NONE,
  25. SSA_IGNORE,
  26. SSA_DEFAULT,
  27. SSA_BLOCK,
  28. SSA_UNBLOCK,
  29. };
  30. enum signal_type
  31. {
  32. SST_PRE,
  33. SST_POST,
  34. SST_CHILD,
  35. };
  36. #include <grass/defs/spawn.h>
  37. #endif