Skip to content
Snippets Groups Projects
Commit 1419679d authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch '988-ivette-frama-c-socket-name-must-be-short' into 'master'

Resolve "[Ivette] frama-c socket name must be short"

Closes #988

See merge request frama-c/frama-c!3159
parents 7f848c5f 660566c6
No related branches found
No related tags found
No related merge requests found
......@@ -144,6 +144,9 @@ export function getDocuments() { return appProxy.getPath('documents'); }
/** Returns user's downloads directory. */
export function getDownloads() { return appProxy.getPath('downloads'); }
/** Returns temporary directory. */
export function getTempDir() { return appProxy.getPath('temp'); }
/**
Working directory (Application Window).
......
......@@ -401,7 +401,7 @@ export interface Configuration {
command?: string;
/** Additional server arguments (default: empty). */
params: string[];
/** Server socket (default: `ipc:///.frama-c.<pid>.io`). */
/** Server socket (default: `ipc:///tmp/ivette.frama-c.<pid>.io`). */
sockaddr?: string;
/** Shutdown timeout before server is hard killed, in milliseconds
* (default: 300ms). */
......@@ -465,12 +465,14 @@ async function _launch() {
}
buffer.append('\n');
if (!cwd) cwd = System.getWorkingDir();
if (!sockaddr) {
const socketfile = System.join(cwd, `.frama-c.${System.getPID()}.io`);
const tmp = System.getTempDir();
const pid = System.getPID();
const socketfile = System.join(tmp, `ivette.frama-c.${pid}.io`);
System.atExit(() => System.remove(socketfile));
sockaddr = `ipc://${socketfile}`;
}
if (!cwd) cwd = System.getWorkingDir();
logout = logout && System.join(cwd, logout);
logerr = logerr && System.join(cwd, logerr);
params = ['-server-zmq', sockaddr, '-then'].concat(params);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment