Commit Graph

5429 Commits

Author SHA1 Message Date
Cheer Xiao
4d0cfa0e75 dasc: Comment out response printing 2013-07-17 16:49:54 +08:00
Cheer Xiao
1ca191ff9a das.c -> main.c 2013-07-17 16:48:12 +08:00
Cheer Xiao
2d5161ff0a Properly handle exiting 2013-07-17 16:47:07 +08:00
Cheer Xiao
9c966b1638 src/cmd/ is now just src/ 2013-07-05 16:39:03 +08:00
Cheer Xiao
83d01d0b91 Put executables in bin/ 2013-07-05 16:31:05 +08:00
Cheer Xiao
72fe8263e0 Organize the repo as a workspace 2013-07-01 10:35:51 +08:00
Cheer Xiao
992e66f2ef Server: Get CMSG_SPACE and CMSG_LEN right 2013-06-26 10:42:31 +08:00
Cheer Xiao
2bac449143 Update README 2013-06-26 07:20:56 +08:00
Cheer Xiao
b5d0328f2d Fix outdated comment and usage message 2013-06-26 07:20:23 +08:00
Cheer Xiao
ea018e6815 Client: Print response with %s which is more useful 2013-06-26 07:16:01 +08:00
Cheer Xiao
f9316630a5 Server: Put TextTube to line buffer mode 2013-06-26 07:15:25 +08:00
Cheer Xiao
d9d1d6e1e3 Server: Add DieIf, implement DieIf_1 in terms of it 2013-06-26 06:50:22 +08:00
Cheer Xiao
e11be65825 Server: Check_1 -> DieIf_1, swap arguments order 2013-06-26 06:47:46 +08:00
Cheer Xiao
c9569a4931 Server: Close output redirection destination in parent 2013-06-26 05:53:13 +08:00
Cheer Xiao
ba0149fc0d Client: Don't redirect output to /dev/null :) 2013-06-26 05:49:25 +08:00
Cheer Xiao
35cf956d8c Server: Set FD_CLOEXEC on tubes in InitTubes 2013-06-26 05:48:28 +08:00
Cheer Xiao
559a21001b Client: Use int as type for fd, converting to uintptr where needed 2013-06-26 05:47:30 +08:00
Cheer Xiao
a2dde4596b Client: TubeFile -> TextTube 2013-06-26 05:46:01 +08:00
Cheer Xiao
ef186414c1 Server: Remove unused TubeFd 2013-06-26 05:44:12 +08:00
Cheer Xiao
58724e7d31 Server: tube variable names cleanup 2013-06-26 05:43:42 +08:00
Cheer Xiao
c9d79efdf0 Server: remove unused TubeFd 2013-06-26 05:41:30 +08:00
Cheer Xiao
c9b2fc3c31 Remove dummy input redirection code 2013-06-26 05:40:16 +08:00
Cheer Xiao
eb504be5d1 Implement output redirection
* The interface will change to allow redirection of arbitrary fd
* dasc now redirects all outputs to /dev/null
2013-06-26 05:38:17 +08:00
Cheer Xiao
b3dad05bd6 Remove an unused FILE 2013-06-25 23:20:54 +08:00
Cheer Xiao
8d670de486 Implement fd passing throught UNIX socket.
An additional socket is added to pass fds.
2013-06-25 23:15:36 +08:00
Cheer Xiao
023c17535a Add dummy structure for passing redirections
Implementation coming soon.
2013-06-25 14:18:14 +08:00
Cheer Xiao
cfed34c418 Update README 2013-06-25 11:31:09 +08:00
Cheer Xiao
77c187cff4 Use a pair of UNIX sockets instead of two pipes to communicate.
* UNIX socket is needed to pass file descriptors between processes.
* The socket pair is termed the "tube", a name that's likely to change in
  future.
2013-06-24 23:10:16 +08:00
Cheer Xiao
b1dbe8621b Let the client use json.Decoder to decode response 2013-06-23 23:45:48 +08:00
Cheer Xiao
f813b95022 Let the server use json_loadf to load request.
This makes it possible to span a request over several lines, making testing
with dasc-dummy easier.
2013-06-23 23:20:55 +08:00
Cheer Xiao
75bb63fb0c Update sample data 2013-06-23 23:14:34 +08:00
Cheer Xiao
4f3b1463fb Use composition to implement tagged union in request too.
C part still uses conventional tagged union.
2013-06-23 23:13:14 +08:00
Cheer Xiao
fff0c99526 Use composition to implement tagged union in response
C part still uses conventional tagged union.
2013-06-23 11:09:30 +08:00
Cheer Xiao
58f3a79f7b Let client decode received response as JSON. 2013-06-22 23:24:55 +08:00
Cheer Xiao
ebbf17e3aa Server: Use _<header>_h_ as header guard macro 2013-06-20 14:54:52 +08:00
Cheer Xiao
2872dfab87 Split client into separate go sources 2013-06-19 12:53:54 +08:00
Cheer Xiao
0351de73f1 Pass client/ directory to go build 2013-06-19 12:29:52 +08:00
Cheer Xiao
bd9580577c Client: pass OS environment to server 2013-06-18 22:55:24 +08:00
Cheer Xiao
aef6937ecc Remove Slurp 2013-06-18 22:43:17 +08:00
Cheer Xiao
54098b9049 Remove WriteRes 2013-06-18 22:42:12 +08:00
Cheer Xiao
6e863de197 Pack ResBadRequest.err correctly 2013-06-18 22:41:34 +08:00
Cheer Xiao
c5f84106c8 Use FreeRes instead of free to free response structs 2013-06-18 22:39:49 +08:00
Cheer Xiao
769f642d99 Implement ResBadRequest 2013-06-18 22:39:11 +08:00
Cheer Xiao
5bb812c56e Define _GNU_SOURCE in CFLAGS, not req.c 2013-06-18 22:29:41 +08:00
Cheer Xiao
e7ae49adde Implement ResProcState. 2013-06-18 22:21:41 +08:00
Cheer Xiao
9e5ae112a5 Implement ResCmd. 2013-06-18 22:12:24 +08:00
Cheer Xiao
81cae45f3d Update sample requests in data/. 2013-06-18 21:46:32 +08:00
Cheer Xiao
005375582c Add dasc-dummy, the simpliest dasc implementation for testing 2013-06-18 21:44:38 +08:00
Cheer Xiao
89517efc66 Client: Give up terminal until external state change.
It's now possible to run `cat` and `vim` from `das`! dasc's response handling
is currently very adhoc, though.
2013-06-18 21:32:04 +08:00
Cheer Xiao
d00be693b0 Client: use same name for request structs (Req and ReqCmd) 2013-06-18 21:28:15 +08:00