Project

General

Profile

Actions

Bug #16554

open

libproc default ops should set errno

Added by Robert Mustacchi 15 days ago. Updated 7 days ago.

Status:
New
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

libproc has several different backends and works by having a stock operations vector that will error on backend operations that is then overwritten with a handful of supported operations. As an example, the way that a live process obtains information is from reading from /proc, while a core file reads it from an elf note, and often times this isn't supported on an idle entity. If an entry isn't supported, then it often leads to confusing behavior because it will return an error value (-1, NULL, etc.), but it won't indicate that in any useful way. We should have these cases that aren't void set errno to ENOTSUP.

Actions #1

Updated by Electric Monk 15 days ago

  • Gerrit CR set to 3474
Actions #2

Updated by Robert Mustacchi 7 days ago

I tested this as part of developing #16076 and related and confirmed that running certain libproc commands on a plain file (via mdb) now properly errored and gave a meaningful issue. This was also used during development of #16076 where I had support for core files but not live processes during an intermediate portion of it.

Actions

Also available in: Atom PDF