Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the -a cmdline flag actually work.

If specified, -a says what file to open as the unix socket.
  • Loading branch information...
commit 3ec4438ea3364cd12d0f6488763fbc6e4c39a647 1 parent 0308855
Kirsten Peryer authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 charade.c
View
8 charade.c
@@ -135,8 +135,14 @@ create_socket(void)
remove_socket_at_exit = 1;
- int ret = snprintf(socket_name, sizeof(socket_name),
+ int ret;
+ if (g_socket_name) {
+ ret = snprintf(socket_name, sizeof(socket_name),
+ "%s", g_socket_name);
+ } else {
+ ret = snprintf(socket_name, sizeof(socket_name),
"%s/agent.%ld", socket_dir, (long)getpid());
+ }
if (ret >= sizeof(socket_name)) {
// Would have liked to print more...
EPRINTF(0, "socket_name too long (%d >= %d).\n",
Please sign in to comment.
Something went wrong with that request. Please try again.