47,519 questions
Advice
0
votes
13
replies
186
views
Is it possible to develop an iOS-like operating system based on RISC-V?
Recently, World Leaks published documents on the dark web related to Apple’s 630G hardware. Would it be possible to use this hardware documentation as a reference to design a RISC-V-based operating ...
Best practices
0
votes
3
replies
124
views
Filtering packets using recvfrom() and MSG_PEEK
I've got a UdpPeer class:
class UdpPeer {
struct sockaddr_storage remoteAddr;
socklen_t addrlen;
public:
UdpPeer(struct sockaddr_storage const& addr, socklen_t addr);
void ...
Score of 2
1 answer
270 views
Is there a way to determine IP address family contained in `std::string`?
I've got a class UdpPeer with setters:
class UdpPeer {
struct sockaddr_storage addr;
socklen_t;
public:
void setAddr(struct sockaddr_storage const& addr, const socklen_t addrlen);
...
Score of 0
1 answer
84 views
csh script calling some .sql scripts but not others
I have a csh script set up to run multiple .sql scripts within SQLPLUS.
It is running some scripts, but not others.
The scripts all work as expected when run individually in SQLPLUS, so I know the ...
Score of 5
1 answer
178 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 ...
Score of 3
1 answer
117 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
85
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 ...
Score of 0
0 answers
73 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 ...
Score of 0
1 answer
228 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 ...
Score of 1
0 answers
79 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. ...
Score of 2
0 answers
86 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)....
Score of 2
5 answers
234 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 ...
Score of 4
1 answer
136 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 ...
Score of 0
1 answer
82 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:...
Score of 4
1 answer
170 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 ...