Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8f610390 authored by Johannes Kanig's avatar Johannes Kanig Committed by Sylvain Dailler
Browse files

Q213-024 why3server allows to take long path as socket

Unix sockets have the restriction that the path to the socket must be
quite short (100 chars give or take depending on exact OS). We can
workaround this limitation by chdir'ing to the dirname of the socket
first. We need to do that in the client and server parts of the code,
but only for Unix (windows doesn't use Unix sockets obviously).

Right now this code is not strictly needed in gnatprove, because we
don't pass a path, only a filename as the socket. But this will change
later.

* prove_client.ml
(client_connect): save curdir, change to dirname, connect to basename,
  then go back to curdir
* options.c
rename socketname because it would clash with basename from libgen.h
* server-unix.c
rename of basename to socketname
(server_init_listening): save curdir, change to dirname, connect to
  basename, then go back to curdir
* server-win.c
rename of basename to socketname

Change-Id: Ib69587dfa136f6ced753c983bc37203c37acb936
(cherry picked from commit e6c15eb26d6077e814ab8c72deb92fc86e43600a)
parent 7904985c
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment