(Qt)多进程报错:could not bind to file /tmp/qtembedded-0/QtEmbedded-0

(Qt)多进程报错:could not bind to file /tmp/qtembedded-0/QtEmbedded-0

Q:同时运行多个界面(Qt)进程报错:could not bind to file /tmp/qtembedded-0/QtEmbedded-0
第一个进程是可以运行的,继续运行第二个进程的时候报错,操作示例如下:
[root@sylixos:/apps/test]# ./app1 -qws &
[root@sylixos:/apps/tset]# ./app2 -qws
QWSServerSocket::init: Address already in use
OWSServerSocket::could not bind to file /tmp/qtembedded-0/QtEmbedded-0 
QWSServerPrivate::initserver: server socket not listening: Event full
Failed to bind to /tmp/qtembedded-0/QtEmbedded-0
[root@sylixos:/apps/tset]#

第一个进程可以运行的,继续运行第二个进程的时候报错。
解决方式:只需要一个加 -qws参数,做服务即可,第二个不要加qws参数,即:./app1 -qws & 启动后(进程1),./app2 &(进程2)

    • Related Articles

    • Qt运行报错:could not bind to file /tmp/qtembedded-0/QtEmbedded-0

      Q:Qt 运行报错 :could not bind to file /tmp/qtembedded-0/QtEmbedded-0 该如何解决? 进程正在运行... QWSServerSocket::init: Address already in use OWSServerSocket::could not bind to file /tmp/qtembedded-0/QtEmbedded-0  QWSServerPrivate::initserver: server socket not ...
    • tmp 目录无权限运行失败分析

      Q:SylixOS 下运行 QT 程序出现提示 tmp 下目录无权限导致运行失败。 设备在更换镜像及文件系统后,启动正常,但是调试串口提示QT程序启动运行错误,提示信息如下: Qt for Embedded Linux data directory has incorrect permissions: /tmp/qtembedded-1 Qt for Embedded Linux data directory has incorrect permissions: ...
    • Qt for Embedded Linux data directory has incorrect permissions

      Q:SylixOS 下运行 QT 程序出现提示 tmp 下目录无权限导致运行失败。 设备在更换镜像及文件系统后,启动正常,调试串口提示 QT 程序启动运行错误,提示信息如下: Qt for Embedded Linux data directory has incorrect permissions: /tmp/qtembedded-1 Qt for Embedded Linux data directory has incorrect permissions: ...
    • QT 程序启动加载流程简介

      1. QT应用程序启动加载流程简介 1.1 QWS与QPA启动客户端程序区别 1.1.1 QWS(Qt Window System)介绍 QWS(Qt Windows System)是QT自行开发的窗口系统,体系结构类似X Windows的C/S结构。QWS Server在物理设备上显示,QWS Client实现界面,两者通过socket进行彼此的通讯。在很多嵌入式系统里,QT程序基本上都是用QWS来实现,这样保证程序的可移植性。 在运行QT程序时添加-qws参数,表示这个程序是QWS ...
    • 系统启动时,如何指定 /tmp 挂载为 RAM 文件系统

      问:系统启动时,如何指定/tmp挂载为RAM文件系统? 系统启动时指定 /tmp 使用 RAM 文件系统,需要设置两部: 首先创建创建挂载点并创建目录,之后设置启动参数的根文件系统映射关系,具体示例如下: