abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit d9929a057051f3287ef2a60102ba99fb6d54f68b
parent c999a6322b2ad7a70a9d1c2fd81a64ee6acb17fe
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 24 Feb 2014 17:29:17 +0100

Unlink socket when forkpty fails

Diffstat:
abduco.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/abduco.c b/abduco.c @@ -282,6 +282,7 @@ static bool create_session(const char *name, char * const argv[]) { wait(&status); /* wait for first fork */ if ((status = read_all(pipefds[0], errormsg, sizeof(errormsg))) > 0) { write_all(STDERR_FILENO, errormsg, status); + unlink(sockaddr.sun_path); exit(EXIT_FAILURE); } close(pipefds[0]);