mirror of https://github.com/martanne/abduco
Expose current session socket as $ABDUCO_SOCKET
This is an absolute path to the Unix domain socket representing the current session.
This commit is contained in:
parent
4c3e2c8c70
commit
c33ee37b43
2
abduco.1
2
abduco.1
|
|
@ -144,6 +144,8 @@ is examined, if it is not set
|
||||||
is executed.
|
is executed.
|
||||||
.It Ev ABDUCO_SESSION
|
.It Ev ABDUCO_SESSION
|
||||||
The current session name available to the supervised command.
|
The current session name available to the supervised command.
|
||||||
|
.It Ev ABDUCO_SOCKET
|
||||||
|
The absolute path of the session socket available to the supervised command.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
See the
|
See the
|
||||||
|
|
|
||||||
1
abduco.c
1
abduco.c
|
|
@ -385,6 +385,7 @@ static bool set_socket_name(struct sockaddr_un *sockaddr, const char *name) {
|
||||||
session_name = basename(buf);
|
session_name = basename(buf);
|
||||||
}
|
}
|
||||||
setenv("ABDUCO_SESSION", session_name, 1);
|
setenv("ABDUCO_SESSION", session_name, 1);
|
||||||
|
setenv("ABDUCO_SOCKET", sockaddr->sun_path, 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue