Project

General

Profile

Bug #8416

Wt crashes in ~Configuration

Added by Kirill Poteryaev 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/27/2021
Due date:
% Done:

0%

Estimated time:

Description

Hello!
I faced with problem using Wt. My program failed in the begin of execution.
After research I realized, that problem was in http/Configuration.C:

Configuration::~Configuration()
{
    if (parentPort_ == -1)
            unlink(pidPath_.c_str());
}

pidPath_ was empty, and programm stopped after unlink function call.
So I have to add a non empty string checking, like this:

Configuration::~Configuration()
{
    if (parentPort_ == -1)
       if(!pidPath_.empty())          // <------------
            unlink(pidPath_.c_str());
}

I am not sure it is correct, but program no more crashes.
Have you ever faced with something like this?

#1

Updated by Korneel Dumon 3 months ago

Hi,

that's odd, from the documentation it seems it should just set ENOENT flag if the path is empty. Which OS are you on? Is there some kind of error shown on the console?

Korneel

Also available in: Atom PDF