Project

General

Profile

Actions

Bug #8416

open

Wt crashes in ~Configuration

Added by Kirill Poteryaev almost 3 years ago. Updated almost 3 years 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?

Actions #1

Updated by Korneel Dumon almost 3 years 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

Actions

Also available in: Atom PDF