python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Perl Fcntl calls to F_SETPIPE_SZ or F_GETPIPE_SZ throws "Bad file descriptor"
Background:
I am trying to write a small script that logs JSONS concurrently, if the file sizes are small, things are ok. But when file sizes are large, processes start to overwrite each other. This S...
ibrahim tanyalcin
Votes: 0
Answers: 1
How can I unlock file in c
I tried to lock-unlock file in c. If the file is exist then there is no problem but if file does not exist and file is created, file stays locked. If I tried to open the file, It did not open. It says...
johnxx987
Votes: 0
Answers: 1
How is a read system call different from the istream::read function?
My Operating Systems professor was talking today about how a read system call is unbuffered while a istream::read function has a buffer. This left me a bit confused as you still make a buffer for the ...
DataInTheStone
Votes: 0
Answers: 1
How can I set a pipe to O_NONBLOCK perl
This works fine:
#!/usr/bin/perl -w
#
#pipe2 - use pipe and fork so child can send to parent
use IO::Handle;
pipe(READER, WRITER);
WRITER->autoflush(1);
if ($pid = fork) {
close WRITER;
...
user1424074
Votes: 0
Answers: 1