Skip to main content

Jul
3
comment How to get the time zone from datetime with zoneinfo libraries in Python?
@Jdavid_Ar08, that's behavior I'd expect if you omitted the ZoneInfo argument to the constructor. I've updated the example with a complete python code that works for me.
Jul
3
revised How to get the time zone from datetime with zoneinfo libraries in Python?
added 180 characters in body
Jul
2
awarded Yearling
Jul
2
comment How to get the time zone from datetime with zoneinfo libraries in Python?
@MarkRansom, what version of Python? The example above specifies 3.12
Jul
2
awarded Yearling
Jul
1
answered How to get the time zone from datetime with zoneinfo libraries in Python?
Jun
25
comment Sending a SIGINT to specific thread with pthread_kill() results in whole process termination
(@Kekers_Dev, this might not be necessary, but just to clarify, signal disposition is process-wide, not thread-specific. So it doesn't matter if you install your dummy handler in thread 2 or thread 1 or main before any other thread is spawned.)
Jun
25
comment Sending a SIGINT to specific thread with pthread_kill() results in whole process termination
@Kekers_Dev, posted. Thanks!
Jun
25
answered Sending a SIGINT to specific thread with pthread_kill() results in whole process termination
Jun
24
comment Sending a SIGINT to specific thread with pthread_kill() results in whole process termination
Print the SIGINT disposition right before ppoll in both versions. I suspect you'll see that Pro*C rudely installed its own SIGINT handler whereas libpq leaves you with SIG_DFL. In the latter case, then, your process suffers the default disposition of SIGINT, which is abnormal termination.
May
16
comment Swapping column values in MySQL
Related: stackoverflow.com/q/2203202/132382
May
16
awarded Deputy
May
9
awarded Revival
May
5
revised How do you destroy/free a FILE object without closing the underlying file descriptor?
added 261 characters in body
Apr
17
comment How do you destroy/free a FILE object without closing the underlying file descriptor?
@vitiral, that sounds like a separate question, and you'll definitely want to heed @igekami's warning.
Apr
16
comment How do you destroy/free a FILE object without closing the underlying file descriptor?
@ikegami yes, that's an important observation, that mixing stream and descriptor I/O is dangerous. It's not clear to me that the OP's intent is further I/O, however, as opposed to academic curiosity or, say, using the read-end of the pipe as an inherited, simple synchronization mechanism for child processes.
Apr
15
answered How do you destroy/free a FILE object without closing the underlying file descriptor?
Apr
5
answered The difference of placing signal.signal before or after child process is created and started?
Apr
4
comment How to ensure signal raised by sub thread is handled by main thread?
Does this answer your question? In which situations a signal handler can be executed in the non-main thread? The answer there covers how to enforce delivery to a specific thread.
Mar
29
awarded Good Answer
1 2 3 4 5