Software /
code /
prosody
Comparison
teal-src/util/pposix.d.tl @ 11432:113f3912c7cb
util: Add Teal interface definition files
Enables writing code in Teal that is aware of the interfaces and
function prototypes in these other utils.
Could also be used to do type checks on Lua sources, but this tends to
have a lot of noise.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 09 Mar 2021 14:36:46 +0100 |
child | 11459:86904555bffc |
comparison
equal
deleted
inserted
replaced
11431:4874b54af344 | 11432:113f3912c7cb |
---|---|
1 local record pposix | |
2 enum syslog_facility | |
3 "auth" | |
4 "authpriv" | |
5 "cron" | |
6 "daemon" | |
7 "ftp" | |
8 "kern" | |
9 "local0" | |
10 "local1" | |
11 "local2" | |
12 "local3" | |
13 "local4" | |
14 "local5" | |
15 "local6" | |
16 "local7" | |
17 "lpr" | |
18 "mail" | |
19 "syslog" | |
20 "user" | |
21 "uucp" | |
22 end | |
23 | |
24 enum syslog_level | |
25 "debug" | |
26 "info" | |
27 "notice" | |
28 "warn" | |
29 "error" | |
30 end | |
31 | |
32 enum ulimit_resource | |
33 "CORE" | |
34 "CPU" | |
35 "DATA" | |
36 "FSIZE" | |
37 "NOFILE" | |
38 "STACK" | |
39 "MEMLOCK" | |
40 "NPROC" | |
41 "RSS" | |
42 "NICE" | |
43 end | |
44 | |
45 enum ulimit_unlimited | |
46 "unlimited" | |
47 end | |
48 | |
49 type ulimit_limit = number | ulimit_unlimited | |
50 | |
51 record utsname | |
52 sysname : string | |
53 nodename : string | |
54 release : string | |
55 version : string | |
56 machine : string | |
57 domainname : string | |
58 end | |
59 | |
60 record memoryinfo | |
61 allocated : number | |
62 allocated_mmap : number | |
63 used : number | |
64 unused : number | |
65 returnable : number | |
66 end | |
67 | |
68 abort : function () | |
69 | |
70 daemonize : function () : boolean, string | |
71 | |
72 syslog_open : function (ident : string, facility : syslog_facility) | |
73 syslog_close : function () | |
74 syslog_log : function (level : syslog_level, src : string, msg : string) | |
75 syslog_setminlevel : function (level : syslog_level) | |
76 | |
77 getpid : function () : number | |
78 getuid : function () : number | |
79 getgid : function () : number | |
80 | |
81 setuid : function (uid : string) : boolean, string -- string|number | |
82 setgid : function (uid : string) : boolean, string | |
83 initgroups : function (user : string, gid : number) : boolean, string | |
84 | |
85 umask : function (umask : string) : string | |
86 | |
87 mkdir : function (dir : string) : boolean, string | |
88 | |
89 setrlimit : function (resource : ulimit_resource, soft : ulimit_limit, hard : ulimit_limit) : boolean, string | |
90 getrlimit : function (resource : ulimit_resource) : boolean, ulimit_limit, ulimit_limit | |
91 getrlimit : function (resource : ulimit_resource) : boolean, string | |
92 | |
93 uname : function () : utsname | |
94 | |
95 setenv : function (key : string, value : string) : boolean | |
96 | |
97 meminfo : function () : memoryinfo | |
98 | |
99 atomic_append : function (f : FILE, s : string) : boolean, string, number | |
100 | |
101 ENOENT : number | |
102 _NAME : string | |
103 _VESRION : string | |
104 end | |
105 | |
106 return pposix |