47,544 questions
Best practices
4
votes
0
replies
125
views
What are best practices for using AI tools in production without over-relying on them?
I’ve been integrating AI tools (mainly large language models) into parts of our workflow things like content drafting, code suggestions, and internal automation
While the productivity boost is real, I’...
5
votes
1
answer
165
views
How do I set redirected pipes to be non-buffered so I can use system() multiple times?
TLDR: I need to make unix pipes non-buffered so one subprocess can run multiple execs.
Hello, this is for a school assignment on UNIX pipes that I am having trouble with.
We are asked to make a 3 ...
3
votes
1
answer
105
views
Are contents within parentheses executed last?
I came across this line in my homework:
(cat "$@" 2>&1 >&3 | tr a-z A-Z >&2) 3>&1
Is the 3>&1 executed first to create a file descriptor 3 pointing to ...
Advice
0
votes
11
replies
78
views
How do you use files with spaces in a (Linux)for?
I use Cygwin under Windows. Under windows I have created files with spaces in them. I would like to remove the spaces. There are enough files so that doing them individually is impracticable. I have ...
0
votes
0
answers
62
views
RPC communications in Mattermost plugins and Apache-APISIX plugins, Is RPC only for Golang - Golang?
I’m trying to understand how plugin systems differ between Mattermost and Apache APISIX, specifically in how they use RPC for external plugins.
Mattermost plugins must be written in Go. The server ...
0
votes
1
answer
193
views
Deploying chaincode failed, socket is broken
We are running a Fabric test network on an Ubuntu virtual machine. The test network starts up fine using:
./network.sh up createChannel -ca
However, it fails when deploying chaincode. The chaincode ...
1
vote
0
answers
72
views
Resource colors for XmContainer and XmScrolledWindow
I have the following structure:
XmScrolledWindow -> XmContainer
I am struggling to identify which resources control:
a) the border that surrounds the XmContainer when scroll bars are required. ...
2
votes
0
answers
77
views
How to display a label as message window in Motif MainWindow
I want to use the Motif MainWindow using:
A container as work region
A label as message window.
But the label is not shown.
My expectation is that it would be shown below the container (work region)....
2
votes
5
answers
224
views
Using a function to format any list of PATHs
I have this alias to format $PATH into one line per path:
alias path='sed ''s/:/\\n/g'' <<< "$PATH"'
I tried to specify the env var to list, like path $MANPATH but still with a ...
4
votes
1
answer
120
views
How to copy sparse files in Python so that both source and destination have identical size?
The following example script does the following:
Uses truncate to create a 200MB sparse file in /tmp/example/1/sparse.
Uses shutil.copy2 to copy the newly created file to /tmp/example/2/sparse.
Uses ...
0
votes
1
answer
77
views
Error while replacing a variable with a logic in UNIX
I am running below in UNIX,
UOW="20251013115437"
echo ${UOW}
UOW_STR=${UOW:0:4}"-"${UOW:4:2}"-"${UOW:6:2}" "${UOW:8:2}":"${UOW:10:2}":"${UOW:...
4
votes
1
answer
159
views
Is futex essentially an unique integer? any way to expose it by user space code?
So I once learned that UNIX futex is in essence an unique integer, is this statement correct and complete?
If that is true, can I somehow take advantage of it to help avoid deadlock by always locking ...
0
votes
1
answer
50
views
Generic/multi-FS alternative to the XFS_IOC_RESVSP64 ioctl?
The XFS filesystem has (or used to have) a IOCTL named XFS_IOC_RESVSP64 for reserving space: You called it with a given file descriptor, and the XFS driver reserved an amount of space use by for your ...
2
votes
1
answer
129
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 ...
2
votes
0
answers
215
views
How do I connect to my own C server from another machine on same network? [closed]
I can connect a Unix server and client socket just fine, but only if they are on the same machine.
My code does not work even if they are running on separate machines connected to the same router.
To ...