I've a non-blocking socket currently subscribed to:
ev.events = EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLHUP | EPOLLRDHUP| EPOLLET;
It receives a couple of EPOLLINs which I read non-blocking till EAGAIN and then I receive HUP & RDHUP, sometimes with a few bytes more to read.
The other side is just:
send(socket,960_bytes_buffer)
close(s...
My company has traditionally used a Linux command line development environment. We use a script to manage the PATH and LD_LIBRARY_PATH environment variables when compiling and running. This script is called by adding it to the beginning of a command, like this:
sbs make
sbs ../bin/foo.exe
I am trying to get our code to run from Ecli...
I was sent a zip file containing 40 files with the same name.
I wanted to extract each of these files to a seperate folder OR extract each file with a different name (file1, file2, etc).
Is there a way to do this automatically with standard linux tools? A check of man unzip revealed nothing that could help me. zipsplit also does not see...
I have a C++ library that generates much larger code that I would really expect for what it is doing. From less than 50K lines of source I get shared objects that are almost 4 MB and static archives pushing 9. This is problematic both because the library binaries are quite large, and, much worse, even simple applications linking against ...
I've built a test ELF program using the LSB SDK (note that my question is not specific to LSB):
$ /opt/lsb/bin/lsbcc tst.c
$ ls -l a.out
-rwxr-xr-x 1 math math 10791 2009-10-13 20:13 a.out
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
...
Hi,
Anybody has an alternate way of finding and copying files in bash than:
find . -ctime -15 | awk '{print "cp " $1 " ../otherfolder/"}' | sh
I like this way because it's flexible, as I'm building my command (can by any command) and executing it after.
Are there other ways of streamlining commands to a list of files?
Thanks
...
I wanted to try out the Boost::Serialization library for a project I'm working on. I'm also trying to get used to programming in Linux as well. I set up boost in its default locations. I tried compiling the test file they provide here with the command line arguments they provide and it worked fine. In this example they use the .a file.
...
Any programmatic techniques, portable or specific to NT and Linux that get the result of number of large files loading faster? I am after a 'ahead of time', a priori, whatever you prefer to call it mechanisms that I can control in code for two OS-es in question.
Each file has to be processed in full, ie. completely in size and sequenti...
I've created a svn repositoy on a linux server (Debian) and used a client on a windows machine to check my java sources in.
Now I've set up a Hudson server on a different linux server (Ubuntu) to periodically run tests on my code. But the tests fail with a compiler error:
Error: unmappable character for encoding ASCII
On my windows ...
After playing around with NSIS (Nullsoft Scriptable Installation System) for a few days, I really feel the pain it's use brings me. No wonder, the authors claim it's scripting implementation is a "mixture of PHP and Assembly".
So, I hope there is something better to write installation procedures to get Windows programs installed, while ...
I have a lot of data that I want to disseminate to many different threads. This data is coming from a single thread. The consuming threads can safely access the container simultaneously.
The data needs to be merged into the container ever delta seconds (50ms < delta < 1), during which time the consuming threads need to be locked out, ...
I really should know this, but would someone tell me how to change the default database on Linux?
For example:
I have a database test1 on server1 with ORACLE_SID=test1. So, to connect to test1 I can use:
sqlplus myuser/password
Connects to the default database, test1
I would now like the default sqlplus connection to go to database...
I am wondering, do you need a specific device driver to read a usb device in Linux, or should it just be able to be read. If I connect my cell phone or iPod touch to my linux box, it is not found is /proc/partitions and thus is not a mountable device by fdisks standards, though gnomes nautilus does in fact mount the iPod but not the win...
How can get exact total space of a drive via c in linux?
not use shell script.just c,
thanx
...
I was reading through this Advanced Linux Programming tutorial when I encountered a problem. I was trying to eject the CD-ROM drive using this code:
int fd = open(path_to_cdrom, O_RDONLY);
// Eject the CD-ROM drive
ioctl(fd, CDROMEJECT);
close(fd);
Then I try to compile this code and get the following output:
In file included from ...
I need to open an url from my application, on both linux and windows and i want to avoid replacing an existing page on an open browser.
How do i call for it to open?
I know i can use
System.Diagnostics.Process.Start("http://mysite.com");
which should also work under linux, but this will replace any page shown on an already open brow...
I have some code where I frequently copy a large block of memory, often after making only very small changes to it.
I have implemented a system which tracks the changes, but I thought it might be nice, if possible to tell the OS to do a 'copy-on-write' of the memory, and let it deal with only making a copy of those parts which change. H...
How much of a security risk are linux kernel modules? I remember reading that it was possible if someone got access, that all they had to do was load a rootkit module. Is this correct? Is there any way to protect against this?
What parts of the kernel are actually exposed through the module interface, and what functions do programmers h...
Let assume that we have this output in bash console:
$ findgrep RAILS_ENV
./script/munin_stats:7:RAILS_ENV = ENV['RAILS_ENV'] || "development"
./script/munin_stats:12: dbconfig = dbhash[RAILS_ENV]
./lib/tasks/juggernaut.rake:4: @rails_env = ENV["RAILS_ENV"] || "development" ...
I need raw read data from and write data into drive..not via existed filesystem like fat32 or something....i just wanna raw write read......
I was told in Windows i can use CreateFile WriteFile and ReadFile APIs to access data in drive directly... but I dont know in Linux whether there r similar functions....
dont tell me to use hardwar...