7,611 questions
-1
votes
1
answer
62
views
Lifecycle Management: Safely Unsubscribing from HttpClient in Root-Provided Angular Signal Services [closed]
I am implementing a modern state management pattern in Angular (version 16+) where a dedicated service acts as a state facade, integrating traditional RxJS asynchronous operations with the new Signals ...
2
votes
2
answers
74
views
Race condition between signal and pthread_cond_wait
Given
volatile int stopping = 0;
void handler(int) {
stopping = 1;
}
int main(int, char **) {
pthread_sigmask(BLOCK, [INT], ...);
pthread_create();
pthread_sigmask(UNBLOCK, [INT], ......
0
votes
0
answers
39
views
Monitor sigprocmask calls with Syscall User Dispatch?
I'm using prctl(PR_SET_SYSCALL_USER_DISPATCH, ...) to enable Syscall User Dispatch with a SIGSYS handler that gets called when the application issues any syscall. The prctl() call also marks the code ...
-1
votes
1
answer
82
views
Spectral Leakage in Resampled FFT (and how to fix it)
I have a 10 second signal of a pure 50 Hz sine wave sampled at 40.96 kSa/s (409,600 samples). I apply a Hanning window and the magnitude plot of my (numpy) FFT shows (ignoring negative image ...
1
vote
0
answers
43
views
Angular table fails to update after CRUD success
My app uses a facade service (singleton injectable) with signals for state management and RxJS for API calls.
I'm experiencing an inconsistent UI update problem with a table after a successful create ...
0
votes
1
answer
133
views
strange pthread and posix signal application behaviour
I'm having troubles understanding the behaviour of the following application.
There are 3 threads:
worker thread with an infinite loop which locks the mutex, modifies a global variable but in the end ...
-1
votes
1
answer
146
views
Why do the values in the labels keep changing as the candle moves?
I have some signals that are generated through logic within my indicator. They are plotted as “dots, triangles, or arrows” or other shapes. What I wanted was a way to “monitor” the indicator signals. ...
1
vote
1
answer
92
views
Understanding behavior of DBus with respect to killing the process that used DBus to register a name
Take this simple program in Haskell
{-# LANGUAGE OverloadedStrings #-}
import Control.Exception (finally)
import Control.Monad (forever)
import Xmobar (tenthSeconds)
import DBus.Client
startServer' :...
2
votes
1
answer
96
views
Catch mouse enter and leave signals from AppplicationWindow in GTK4 Python
I'm creating a Gtk4 app in python 3 and I want to trigger a state change when the user mouses over the ApplicationWindow but I'm banging my head against a wall trying to figure out what signal string ...
5
votes
1
answer
81
views
Why it is not possible to trap SIGQUIT in Bash in docker build?
Kindly consider the following dockerfile that uses bash image and runs a bash to trap QUIT and then shows that QUIT trap. It should show the string "something".
ARG VERSION=latest
FROM bash:$...
1
vote
1
answer
105
views
futex_wait inside a signal handler
So I am trying to understand if I am missing anything about calling futex_wait inside a signal handler for a SIGSEGV access violation. Ostensibly, it is not on the list of async-signal-safe calls, ...
0
votes
1
answer
99
views
NgRx computed not Update Value when used in NgRx Store
I have a computed in my signal store, which should react on a value change but it just fires 1 time at creating and not when signal values are changing
const initialData = {
gridItems: [] as ...
2
votes
1
answer
106
views
`pthread_kill` randomly send signal to the wrong thread on MacOS
I have multiple threads performing sigwait on the same signal, and the main thread will wake specific thread up via pthread_kill. On Linux the program runs fine, but on MacOS the wrong thread will be ...
5
votes
2
answers
279
views
Signal handling in multi-threaded scenario [closed]
I'm trying to revive Hemlock, which now appears abandoned (original author has been absent for some time now). Mostly this has been a straightforward process of clearing out the bit rot, but I'm now ...
0
votes
0
answers
26
views
fastapi workers die in add_basemap
I have a problem with add_basemap from contextily. (I'm new to this to be honest)
I use fastapi in docker with workers=4, and contextily to make images.
In random time it die add_basemap (I don't know ...
1
vote
0
answers
83
views
Unable to build Signal's libsignal-protocol using wasm-pack – aes-gcm-siv version conflict and crate-type issues
I'm attempting to build the libsignal project using wasm-pack to target WebAssembly for a frontend integration. Specifically, I'm trying to build the libsignal-protocol crate individually rather than ...
0
votes
1
answer
54
views
QSocketNotifier stops triggering signals while in modal dialog in QT5
I have a client server app where things can happen asynchron, including the server disconnecting and reconnecting. The app has a LED indicator (label with green/red icon) that shows the server ...
1
vote
1
answer
70
views
ctrl-C to terminate a pyqt application with a QOpenGLWidget
My main file for a pyqt application looks like this:
#!/usr/bin/env python3
from PyQt5.QtWidgets import QApplication
import signal
import sys
from main_window import MainWindow
if __name__ == "...
5
votes
1
answer
142
views
Create a detached process in linux (shell) to avoid an uncatchable signal
Context : I am making my own cloud save manager for my non steam games, I am in the process of implementing a wrapper that launches games but also loads file from the cloud before opening and when you ...
3
votes
0
answers
216
views
Subscribe or callback on Signal store method?
I want to make a redirect after executing API request (on success) in signal store method.
I have 3 "solutions":
Use callback, but I don't feel it.
Use rxMethod, patch state within ...
1
vote
1
answer
377
views
Is there a way to dynamically compute rxResource() or resource() in Angular (19)
Our use case: in a component, we compute queries for data that should be fetched based on some config. I tried creating rxResource() within a compute to get the data - but also loading status and ...
3
votes
1
answer
77
views
Why is sigaction sending the the raised signal ID twice?
The signal handler passed in sa_sigaction to sigaction receives an int signal id as parameter, but the context info received as second parameter contains the signal id as field again.
Is there a good ...
2
votes
1
answer
107
views
Why does only one SIGINT get queued while others are ignored during signal handling in C?
I'm testing Unix signal behavior in C and noticed something odd. When I press Ctrl+C (sending SIGINT) multiple times quickly while the handler is still running (it sleeps for 3 seconds), only two ...
0
votes
0
answers
112
views
When I update a signal value, the component doesn't re-render to reflect changes in the UI. The value changes internally (I can see it in logs)
I'm using @preact/signals-react with React and SWC, but my UI isn't updating when signal values change. Here's my code:
only red is showing and at sometimes when i saved the file the component got re-...
1
vote
1
answer
231
views
How to notify component that signal store encountered error in service while saving data?
I'm using a signal store as follows. It works as supposed to, except for the error handling. The initial load works correctly and communicates the error to the consuming component.
However, there ...
1
vote
1
answer
140
views
How do I use a drop down to change field in Vega visualization
In Vega or Vega lite, I want to create a stacked area chart where I can change the field used to color the visualization. Here is an example visualization. In this example, I would like to be able ...
0
votes
0
answers
66
views
How to dynamically load an entity in withMethod of ngrx signal store without triggering NG0600?
I'm working with the new ngrx/signals store, and I need to dynamically fetch an entity if it's not already present in the store.
Here's the method I'm using inside a withMethod block :
getTeam(uri: ...
0
votes
1
answer
219
views
How do I set an empty array as default value in toSignal?
I have a DataHandler service that calls a database service and returns the value to the calling component. The database service returns an observable of an array, while I'd like the data handler to ...
0
votes
2
answers
214
views
How do I safely put python signals into a queue?
I am working on a python3 script that handles signals (e.g. signal.SIGWINCH) by putting them in a queue. A separate thread puts user input into that same queue, which is all processed by my program's ...
0
votes
1
answer
55
views
Signal declaration in a separate class for use with QRunnable worker
I'm defining a Qt signal in a separate class derived from QObject for use in a QRunnable worker. The signal is emitted once by the worker as it completes. When creating two workers, the signal is ...
1
vote
1
answer
48
views
QML Keys.onDeletePressed not registering
I'm trying to handle a QML/JavaScript situation where the user presses the delete key. For some reason, Keys.onDeletePressed: {} is not firing. I am getting the signal for onEscapePressed, ...
0
votes
0
answers
77
views
xv6: Kernel Hangs After Handling Custom Signal (Ctrl+C)
I'm working on extending xv6 to handle a custom signal triggered by pressing Ctrl+C. I've modified the trap.c file to check for a pending signal and, if present, adjust the trap frame to jump to the ...
0
votes
1
answer
258
views
How to trigger a method in one NgRx Signal Store when a property in another store updates?
I am working with NgRx Signal Store in an Angular project, and I need to make one store DashboardStore reactively call a method when a property in another store FilterSelectionStore updates.
Use Case:
...
4
votes
0
answers
80
views
async-signal safety of c++ classes
There is a limited number of functions that POSIX defines as async-signal safe.
See here.
This includes some fundamental functions such as write.
Since this is really a C standard (since unix is built ...
1
vote
1
answer
337
views
PySide6 signal not emitting properly when passed to decorator
I have this decorator in python 3.11 that sends a signal encoding the arguments to a function call that it decorates, here:
def register_action(signal=None):
def decorator(func):
def ...
2
votes
2
answers
234
views
In NGRX Signal Store, how can I call a method in a computed value?
In my store feature, if I define a method in the withMethods, then in the later defined withComputed, I can't seem to call one of these methods from a computed value. Is this supported?
0
votes
0
answers
104
views
Is it okay to declare a static array to use as a buffer inside a signal handler? - Printing inside a signal handler
I have an application where I need to print a some things to stdout and stderr inside a signal handler. The only safe way I can do this is with the write system call (I am on Linux). However, I am ...
1
vote
0
answers
147
views
Signal Store State Persistence Issue After Routing
Angular Signal Store state resets to initial values when navigating between components, despite being provided in 'root'. I'm using patchState to update the store. Why isn't the state persisting ...
0
votes
1
answer
71
views
Incorrect modeling of the spectrum of a sequence of pulse signals [closed]
I have a task to simulate a sequence of rectangular pulses. As a result, I wrote Python code, but the end results are not encouraging.
#!/bin/python
import numpy as np
from numpy.fft import fft
...
2
votes
1
answer
57
views
Why does if statement change my type definition? [duplicate]
I'm working on a self-guided exercise to learn about JS signals.
I'm following this blog post, but I'm trying to rewrite the code in TypeScript to better understand it.
While I've managed to get the ...
0
votes
0
answers
53
views
Delay in Restarting a High-Memory Process After Crash
Description:
I have a process that consumes a large amount of memory (+100GB RSS).
There's a usage by huge pages, but most of the memory is allocated in a naive way via malloc().
When this process ...
2
votes
1
answer
440
views
How to combine AbortController and AbortSignal?
To specify a timeout of a fetch request, we can use a AbortSignal.timeout() signal:
await fetch(url, {
signal: AbortSignal.timeout(10 * 1000),
});
But this is just a standalone signal, not a ...
0
votes
2
answers
74
views
Send signal (SIGINT) to a C sub-process [closed]
I use some Python bindings to a C++ based library which starts some processes.
I have the problem that while the execution is within that code-path it does not "feel" a SIGINT, but as soon ...
1
vote
1
answer
472
views
Updated signal value is delayed in child component, if the value is passed down as an `input()`
I have a service which maintains some state using a signal.
The service also exposes an rxjs observable which emits when a certain event has taken place. This event takes place after the signal value ...
1
vote
1
answer
87
views
Testing Angular signal fails
footer component ts file:
import { AppSignalState } from './../../app-state/app-state.service';
import { CommonModule } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
...
2
votes
2
answers
543
views
NgRx signalStore with generic methods
I'm using Angular 19 with Ngrx.
I have multiple store with the same methods to handle the CRUD operations.
I would like than withMethods use an interface to set this store generic.
I tried to pass an ...
3
votes
1
answer
74
views
Why doesn't SigPnd change in /proc/<pid>/status?
I am trying to understand the signals in POSIX/Linux. I wrote this test.c program:
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
void handler(...
1
vote
0
answers
135
views
What is the correct architectural design of a Signal Store with many state objects and complex API services
Let's say I'm working with something along these lines:
I want to use Signal Stores and signal based code as much as possible.
Store Size
If I have 5 discrete memory structures which I need to store. ...
1
vote
2
answers
102
views
How / whether to replace a getter with a parameter by a computed signal
Is there a comparable signals based approach to something like this:
/** PROPS */
selectedOption = signal<string | null>(null);
getSelectedState(option: string): boolean | undefined {
if (...
1
vote
0
answers
89
views
Scroll Sync between 2 Cdk virtual viewports header and row
I'm using a separate CDK virtual scroll viewport for the header and need to keep it synchronized with the main row viewport. Currently, I'm using the elementScrolled event of the row viewport to track ...