Closed aadcg closed 1 year ago
Fixed with 792754de0ba75d4bff2ad9a0b15c28f3945d4510.
Follow the stream of events below.
(progn
(setf electron::*interface*
(make-instance
'electron:interface
:electron-socket-path (uiop:xdg-runtime-dir "electron.socket")
:lisp-socket-path (uiop:xdg-runtime-dir "lisp.socket")))
(electron:launch)
(sleep 1)
(defparameter win (make-instance 'electron:browser-window)))
electron.socket
and lisp.socket
are created. A window pops up.
(kill win)
The window is killed, the process is killed and the sockets deleted. Therefore (no surprises):
(defparameter win2 (make-instance 'electron:browser-window))
=>
#<Syscall "connect" signalled error ENOENT(2) "No such file or directory" FD=7>
[Condition of type IOLIB/SYSCALLS:ENOENT]
This is indeed Electron's default behaviour. And it's a good default.
The sockets are deleted when the electron process is killed since the OS sees it was started as electron /path/to/server.js /run/user/1000/electron.socket /run/user/1000/lisp.socket
, so it deletes them automatically.
Long story short: this is a non-problem. It wasn't solved in the sense that everything's working as it should be. As always, the issue is between the keyboard and the chair.
Classic pebkac ;-)
Long story short: this is a non-problem. It wasn't solved in the sense that everything's working as it should be. As always, the issue is between the keyboard and the chair.
I'm confused, is there a problem? Even a pebkac?
You seem to imply that making a window without a running instance could be expected to work nonetheless (e.g. by starting an instance automatically). Is that what you mean?
You seem to imply that making a window without a running instance could be expected to work nonetheless
No, I think Electron's default behaviour makes sense.
From the very start, this is a misinterpretation of mine (a pebkac) rather than a real issue - that's what I have clarified. In other words, the conclusion from this issue is not "it has been solved", but "it's expected behaviour" and a pebkac of mine :)
OK!
Steps to reproduce:
After reading this explanation, it seems to me that our IPC mechanism to talk to Electron needs to be re-designed.