CREATE-PROCESS: allow setting the current directory of the new process
[iolib.git] / src / os / ffi-functions-unix.lisp
blobc755927a58b56a712904db8de32171a3fa282f94
1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- lfp_spawn(3) and its minions
4 ;;;
6 (in-package :iolib.os)
8 (defsyscall (lfp-spawn "lfp_spawn")
9 (:int :restart t)
10 (pid :pointer)
11 (path :string)
12 (arguments :pointer)
13 (environment :pointer)
14 (file-actions :pointer)
15 (attributes :pointer))
17 (defsyscall (lfp-spawnp "lfp_spawnp")
18 (:int :restart t)
19 (pid :pointer)
20 (file :string)
21 (arguments :pointer)
22 (environment :pointer)
23 (file-actions :pointer)
24 (attributes :pointer))
26 (defsyscall (lfp-spawnattr-init
27 "lfp_spawnattr_init")
28 :int
29 (attributes :pointer))
31 (defsyscall (lfp-spawnattr-destroy
32 "lfp_spawnattr_destroy")
33 :int
34 (attributes :pointer))
36 (defsyscall (lfp-spawnattr-setflags
37 "lfp_spawnattr_setflags")
38 :int
39 (attributes :pointer)
40 (flags :uint32))
42 (defsyscall (lfp-spawnattr-setsigmask
43 "lfp_spawnattr_setsigmask")
44 :int
45 (attributes :pointer)
46 (sigmask :pointer))
48 (defsyscall (lfp-spawnattr-setsigdefault
49 "lfp_spawnattr_setsigdefault")
50 :int
51 (attributes :pointer)
52 (sigdefault :pointer))
54 (defsyscall (lfp-spawnattr-setpgroup
55 "lfp_spawnattr_setpgroup")
56 :int
57 (attributes :pointer)
58 (pgroup pid-t))
60 (defsyscall (lfp-spawnattr-setuid
61 "lfp_spawnattr_setuid")
62 :int
63 (attributes :pointer)
64 (uid uid-t))
66 (defsyscall (lfp-spawnattr-setgid
67 "lfp_spawnattr_setgid")
68 :int
69 (attributes :pointer)
70 (gid gid-t))
72 (defsyscall (lfp-spawnattr-setcwd
73 "lfp_spawnattr_setcwd")
74 :int
75 (attributes :pointer)
76 (path sstring))
78 ;; (defsyscall (lfp-spawnattr-getschedpolicy
79 ;; "lfp_spawnattr_getschedpolicy")
80 ;; :int
81 ;; (attributes :pointer)
82 ;; (schedpolicy :pointer))
84 ;; (defsyscall (lfp-spawnattr-setschedpolicy
85 ;; "lfp_spawnattr_setschedpolicy")
86 ;; :int
87 ;; (attributes :pointer)
88 ;; (schedpolicy :pointer))
90 ;; (defsyscall (lfp-spawnattr-getschedparam
91 ;; "lfp_spawnattr_getschedparam")
92 ;; :int
93 ;; (attributes :pointer)
94 ;; (schedparam :pointer))
96 ;; (defsyscall (lfp-spawnattr-setschedparam
97 ;; "lfp_spawnattr_setschedparam")
98 ;; :int
99 ;; (attributes :pointer)
100 ;; (schedparam :pointer))
102 (defsyscall (lfp-spawn-file-actions-init
103 "lfp_spawn_file_actions_init")
104 :int
105 (file-actions :pointer))
107 (defsyscall (lfp-spawn-file-actions-destroy
108 "lfp_spawn_file_actions_destroy")
109 :int
110 (file-actions :pointer))
112 (defsyscall (lfp-spawn-file-actions-addopen
113 "lfp_spawn_file_actions_addopen")
114 :int
115 (file-actions :pointer)
116 (fd :int)
117 (path :string)
118 (flags :int)
119 (mode mode-t))
121 (defsyscall (lfp-spawn-file-actions-addclose
122 "lfp_spawn_file_actions_addclose")
123 :int
124 (file-actions :pointer)
125 (fd :int))
127 (defsyscall (lfp-spawn-file-actions-adddup2
128 "lfp_spawn_file_actions_adddup2")
129 :int
130 (file-actions :pointer)
131 (fd :int)
132 (newfd :int))