##// END OF EJS Templates
chg: add sockdirfd to cmdserveropts...
Jun Wu -
r28852:7b5f5a1b default
parent child Browse files
Show More
@@ -36,17 +36,23 b' struct cmdserveropts {'
36 36 size_t argsize;
37 37 const char **args;
38 38 int lockfd;
39 int sockdirfd;
39 40 };
40 41
41 42 static void initcmdserveropts(struct cmdserveropts *opts) {
42 43 memset(opts, 0, sizeof(struct cmdserveropts));
43 44 opts->lockfd = -1;
45 opts->sockdirfd = AT_FDCWD;
44 46 }
45 47
46 48 static void freecmdserveropts(struct cmdserveropts *opts) {
47 49 free(opts->args);
48 50 opts->args = NULL;
49 51 opts->argsize = 0;
52 if (opts->sockdirfd != AT_FDCWD) {
53 close(opts->sockdirfd);
54 opts->sockdirfd = AT_FDCWD;
55 }
50 56 }
51 57
52 58 /*
General Comments 0
You need to be logged in to leave comments. Login now