qmi-proxy being deleted after use
Kasper Cheng
kaspercheng77 at gmail.com
Wed Jan 22 18:18:00 UTC 2025
ar no the problem is not the socket name, it's the way we close the socket.
On Wed, Jan 22, 2025 at 10:16 AM Kasper Cheng <kaspercheng77 at gmail.com>
wrote:
> If I rename the qmi-proxy to something else before use, it's not being
> deleted. Maybe we should rename QMI_PROXY_SOCKET_PATH to something like
> qmi-proxy-socket?
>
> unlinkat(AT_FDCWD, "qmi-proxy", 0) = -1 ENOENT (No such file or
> directory)
>
>
> On Wed, Jan 22, 2025 at 10:08 AM Bjørn Mork <bjorn at mork.no> wrote:
>
>> Kasper Cheng <kaspercheng77 at gmail.com> writes:
>>
>> > Attached is a trace log from raspberry 5's apt install of qmi-proxy
>> 1.32.2,
>> > and a latest git build I made yesterday.
>> > Both logs show a call to unlinkat() at the end.
>> > Does it mean that it is expected for the user to copy qmi-proxy to a
>> temp
>> > folder before use, and qmi-proxy clean itself up on exit?
>>
>> The dispose() method in libqmi-glib/qmi-proxy.c calls
>>
>> g_unlink (QMI_PROXY_SOCKET_PATH)
>>
>> and we have
>>
>> #define QMI_PROXY_SOCKET_PATH "qmi-proxy"
>>
>> so I guess the behaviour is expected if you run qmi-proxy from the
>> directory where the binary is located.
>>
>> But it doesn't really make sense. The socket name is "\0qmi-proxy"
>> AFAIK. So what exactly is this trying to unlink?
>>
>>
>>
>> Bjørn
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20250122/6663c3d4/attachment.htm>
More information about the libqmi-devel
mailing list