#uapi — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #uapi, aggregated by home.social.
-
TIL on Linux you cannot rely on the timestamps of files in
/proc/<pid>to give you information about a process start time: those might be reset on suspend of if a process gets aSIGSTOP.
Instead, one should look at the 22nd field of/proc/pid/stat:starttime.
But it gives you the process start time in system clock ticks, not seconds. So you must divide it bysysconf(_SC_CLK_TCK)to get seconds.
But wait, it gives you the start time in ticks since boot. So you must useclock_gettime(CLOCK_BOOTTIME, ...)to get a usable comparison to the current time.Anyway, now progressrm should be more accurate at guessing the file arguments progression (and remaining time) of rm commands.
-
TIL on Linux you cannot rely on the timestamps of files in
/proc/<pid>to give you information about a process start time: those might be reset on suspend of if a process gets aSIGSTOP.
Instead, one should look at the 22nd field of/proc/pid/stat:starttime.
But it gives you the process start time in system clock ticks, not seconds. So you must divide it bysysconf(_SC_CLK_TCK)to get seconds.
But wait, it gives you the start time in ticks since boot. So you must useclock_gettime(CLOCK_BOOTTIME, ...)to get a usable comparison to the current time.Anyway, now progressrm should be more accurate at guessing the file arguments progression (and remaining time) of rm commands.
-
I built a tool for image based linux / discoverable disk images:
https://github.com/malt3/ddi-toolFor now, it can update the embedded kernel cmdline of a UKI.
More features are in the pipeline. -
I built a tool for image based linux / discoverable disk images:
https://github.com/malt3/ddi-toolFor now, it can update the embedded kernel cmdline of a UKI.
More features are in the pipeline. -
Doing some work on #uapi lately. Interestingly, Django, Flask and Quart set the response `content-type` header to `text/html` by default, even when the status code is 204 and there's no actual response body. Starlette and Aiohttp leave it unset, as expected.