linux

How do I capture all of my compiler's output to a file?

Hello, I'm building an opensource project from source (CPP) in Linux. This is the order: $CFLAGS="-g Wall" CXXFLAGS="-g Wall" ../trunk/configure --prefix=/somepath/ --host=i386-pc --target=i386-pc $make While compiling I'm getting lot of compiler warnings. I want to start fixing them. My question is how to capture all the compiler o...

What exactly happens when sleeping a thread

I was wondering how the task scheduler in the operating system handles sleeping threads. By this I mean whether a sleeping thread is still checked by the scheduler, or just skipped entirely when figuring out which thread to active for the next 10 ms or however long it's given. My reason for asking this, is to figure out whether a sleep...

extend boost.asio file i/o for linux

According to this question about the topic there is no asynchronous file io in asio anything but Windows... So fine, does anyone know of any already written extensions to asio that do asynchronous file io on Linux? Or does anyone know of any examples on how to extend asio to support asynchronous io to {insert-whatever-here}? ...

php class to handle and parse the courier mail server format

does anyone know if there's a class out there that parses courier mailboxes (ie: courier imap mail server)? returning lists, and parsing individual messages? this is not a protocol issue, i'm not interested in connecting to a remote mail-server. rather, i'm interested in manipulating the local mail-server via filesystem. In particular,...

How do I change my pwd to the real path of a symlinked directory?

Hi folks. Here's a rather elementary *nix question: Given the following symlink creation: ln -s /usr/local/projects/myproject/ myproject ... from my home directory /home/jvf/, entering the myproject symlink gives me a pwd /home/jfv/myproject/. Now, I would like to enter the parent directory of the directory I've symlinked to, but th...

How does one do Raw IO on Mac OS X? (ie. equivalent to Linux's O_DIRECT flag)

Hi, I having been googling for a way to do raw (sometimes called direct) i/o under mac os. Raw i/o turns of the operating system page cache to give the application more direct access to the disk. This is useful because some of the filestructure I am using are not efficient using LRU page replacement. It is fairly straight forward to imp...

Integrating linux into Active Directory- best approach?

We have a bunch of RHEL5/CENTOS5 boxes. And now, despite our best efforts, we are having XP desktops and AD (WS2003) shoved down our throats. Currently the linux boxes are all standalone, and use the usual /etc/passwd authentications, /etc/group groups, /etc/sudoers sudoers, and so forth. So this could actually be a constructive th...

Internals of a Linux system call

What happens (in detail) when a thread makes a system call by raising interrupt 80? What work does Linux do to the thread's stack and other state? What changes are done to the processor to put it into kernel mode? After running the interrupt handler, how is control restored back to the calling process? What if the system call can't be ...

some documentation/book about creating kernel modules for linux?

some documentation/book about creating kernel modules for linux? ...

return User Quota with PHP from Linux OS

Hi, I need to find out quota details for the current user, I`ve tried exec("quota 'username'", $retParam) and also system() but nothing is returned. Any ideas ? Thank you. ...

Classpath compiles correctly, but will not run. What am I missing

Greetings, I'm playing around with mahout, I've written a basic java class which imports some of the libraries. It seems my classpath is correct when compiling, I get no errors or complaints at all. However when I run the compiled class I get an exception saying... Exception in thread "main" java.lang.NoClassDefFoundError: Test Cau...

How do i create a unicode filename in linux?

I heard fopen supports UTF8 but i dont know how to convert an array of shorts to utf8 How do i create a file with unicode letters in it? I prefer to use only built in libraries (no boost which is not installed on the linux box). I do need to use fopen but its pretty simple to. ...

how to sort a QTableWidget with my own code?

Hi, I am using Qt4.5.2 on Linux. I have a simple QTableWidget, in which a column displays dates in a human-friendly format. Unfortunately "human-friendly dates" are not easy to sort correctly. So, in the QTableWidget I keep a hidden column with the UNIX timestamp corresponding to that date. I am trying to make sure that, whenever a req...

What character sequence should i not allow in a filename?

I found out and tested linux allows any character as a file name except for / and null. So what sequence should i not allow in a filename? I heard a leading - may confuse some command line programs which doesnt matter to me however it may bother other people if they decide to collect a bunch of files and filter it with some GNU programs....

Writing a video chat widget in Flash and PHP.

I am writing a webcam chat in flash (for the client side), I also am using PHP/Apache/Memcache for the server side for text chats... What exactly will I need in terms of server side software to connect these users flash/swf sessions together? I currently have an ubuntu server running Lamp (Apache/Php/MySql/Memcache)... the client to c...

Problem installing haskell-platform

I'm trying to install Haskell (for the first time). Following the instructions on the website, I downloaded: ghc-6.10.4-i386-unknown-linux-n.tar.bz2 haskell-platform-2009.2.0.2.tar.gz I unpacked the ghc package, and installed it without problems. Then I unpacked haskell-platform and run the following: ./configure --prefix=/usr mak...

File Descriptor Sharing between Parent and Pre-forked Children

In Unix Network Programming there is an example of a Pre-forked server which uses message passing on a Unix Domain Pipe to instruct child processes to handle an incoming connection: for ( ; ; ) { rset = masterset; if (navail <= 0) FD_CLR(listenfd, &rset); /* turn off if no available children */ nsel = Select(maxfd...

Is there any Linux API, like windows get windows API, Mac get Cocoa?

I know that the Windows platform have windows API from Microsoft, and Mac get the Cocoa API from Apple. I want to know it there any API from the Linux Community? thx a lot. ...

Many files in one directory?

I develop some PHP project on Linux platform. Are there any disadvantages of putting several thousand images (files) in one directory? This is closed set which won't grow. The alternative would be to separate this files using directory structure based on some ID (this way there would be let's say only 100 in one directory). I ask this q...

What to do with error information after stack smashing

I'm experiencing some problems with my C program on Linux. It compiles and runs just fine on Windows. The Linux terminal returns this information: *** stack smashing detected ***: ./student terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x4b)[0xb7e908ab] /lib/lib...