diff options
| author | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
|---|---|---|
| committer | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
| commit | b0de699679e8f1e39af847ed172d1ba605b4370c (patch) | |
| tree | 01dac00471d61f727394e508c613b29cff0ceae5 /tryservice.h | |
bulk upload of source
Diffstat (limited to 'tryservice.h')
| -rw-r--r-- | tryservice.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tryservice.h b/tryservice.h new file mode 100644 index 0000000..ac615eb --- /dev/null +++ b/tryservice.h @@ -0,0 +1,16 @@ + +static int tryservice(char *home, char *service, char *type, char *other, + void *buffer) { + int r; + open_inout(home); + errmsg_puts(-1,0); + errmsg_puts(-1,type); + errmsg_put(-1,service,str_len(service)+1); + if (other) + errmsg_puts(-1,other); + errmsg_puts(infd,0); + + r=read(outfd,buffer, 4*sizeof(struct process)); + close(infd); close(outfd); + return r; +} |
