linux

Clear data at serial port in Linux in C?

I am testing the sending and receiving programs with the code as The main() function is below: #include "lib.h" int fd; int initport(int fd) { struct termios options; // Get the current options for the port... tcgetattr(fd, // Set the baud rates to 19200... cfsetispeed( cfsetospeed( // Enable the receive...

Debian Package Control file Question

I am trying to create a Debian package for a Java application. In my package there is a .jar file which is executable, a script which will run this jar file and a .so file for fmod. I've read this tutorial. In the control file there is a 'Depends' field which basically describes the packages that need to be installed in order to insta...

svn clear projects with all revisions

Hi guys, is there a commend to delete project from svn with all its revisions(total cleanup) ? cheers ...

compiling boost based application using cron

Hi All, I am building some boost based application for various embedded targets. I have developed a script which can build my application with different toolchain for several targets. This script works fine when I run it from command line but if it is invoked from cron it always fails to link the object files. My application has depende...

are posix pipes lightweight?

In a linux application I'm using pipes to pass information between threads. The idea behind using pipes is that I can wait for multiple pipes at once using poll(2). That works well in practice, and my threads are sleeping most of the time. They only wake up if there is something to do. In user-space the pipes look just like two file-h...

Measuring execution time of a call to system() in C++

I have found some code on measuring execution time here http://www.dreamincode.net/forums/index.php?showtopic=24685 However, it does not seem to work for calls to system(). I imagine this is because the execution jumps out of the current process. clock_t begin=clock(); system(something); clock_t end=clock(); cout<<"Execution time: "<...

Dynamic memory managment under Linux

I know that under Windows, there are API functions like global_alloc() and such, which allocate memory, and return a handle, then this handle can be locked and a pointer returned, then unlocked again. When unlocked, the system can move this piece of memory around when it runs low on space, optimising memory usage. My question is that is...

Shell complains 'cannot execute binary file'

Hi everyone, I've playing around with linux and noticed that for some mysterious reason commands like '/bin/sh ' just will not work. Each time I'm trying to start a process it yields 'cannot execute binary file' error message. m@sanctuary:~$ sh sed /bin/sed: /bin/sed: cannot execute binary file When I first launch sh and try to exec...

Running ssh-keygen without human interaction?

Would it be possible to run ssh-keygen without human interaction? I have a shell script that takes care of server deployment from start to finish, but ssh-keygen is the only remaining piece that still requires my input. Would it be possible to feed the parameters to it? Or is there something similar to debconf-set-selections that could...

EPIPE blocks server

I have written a single-threaded asynchronous server in C running on Linux: The socket is non-blocking and as for polling, I am using epoll. Benchmarks show that the server performs fine and according to Valgrind, there are no memory leaks or other problems. The only problem is that when a write() command is interrupted (because the cli...

how to Install SproutCore 1.0 on Ubuntu 9.10

I am trying to intall SproutCore, but it doesn't work. I followed the instructions in How to Install SproutCore in Virtual Enviroment but after the installation I cant start sc in the commandline. So, I hope you understand, because my English is very bad... greetings, Leif ...

fastest way convert tab-delimited file to csv in linux

I have a tab-delimited file that has over 200 million lines. What's the fastest way in linux to convert this to a csv file? This file does have multiple lines of header information which I'll need to strip out down the road, but the number of lines of header is known. I have seen suggestions for sed and gawk, but I wonder if there is ...

Doing coding in Linux through a virtual machine on Windows VS partitioning

I already have experience with setting up virtual machines, running them and other minor tasks. Im a gamer, so I wont get rid of windows (for now at least...) but I do want to be a great programmer and to be involved with the Open-Source community. Id like to know if its a good idea to do my programming in linux through a virtual machin...

regarding graphical user interfaces in c on linux operating system

I want to know whether we need to download GTK for making graphical interfaces in C on linux, since i have read somewhere that it is by default installed. ...

Standard way of distributing source code?

I am relatively new to programming, and have built a few working C++ commandline programs with Xcode in Mac OS X (no dependencies on Mac-only libraries or APIs). My question is: What is the standard way of packaging and distributing the source code (and possibly compiled binaries)? i.e. Almost all Linux programs seemed to be distributed...

What are the calling conventions for UNIX & Linux system calls on x86-64

Explains both UNIX (BSD flavor) & Linux system call conventions for x86-32: http://www.int80h.org/bsdasm/#system-calls http://www.freebsd.org/doc/en/books/developers-handbook/x86-system-calls.html Can any one please tell me or point me to similar doc for x86-64 on both UNIX & Linux? ...

Any porting available of backtrace for uclibc?

We are running the uclibc linux on ARM 9. The problem is uclibc doesn't support backtrace. When a core dump happens, I cannot grab the call stack. Does anyone have a good solution for that? For example, an existing porting of backtrace for uclibc, or any good method to grab the call stack when a core dump happens (uclibc+ARM+Linux)? ...

MySQL nested CASE error I need help with?

What I am trying to do here is: IF the records in table todo as identified in $done have a value in the column recurinterval then THEN reset date_scheduled column ELSE just set status_id column to 6 for those records. This is the error I get from mysql_error() ... You have an error in your SQL syntax; check the manual that corresponds ...

Windows <sys/file.h> equivalent

Is there a Win32 equivalent to the linux header file? I'm working on a Linux to Windows port (and my first time doing so) and it's failing on this file. ...

Eclipse Memory usuage in Windows Vs Linux..

Can someone please give me the details about the Eclipse memory usage in Windows XP and Linux? I heard Eclipse consumes less memory in Linux compared to Windows? Is it true? What ever the OS is, IDE will look for some amount memory so how will it vary with OS? Related Question: Eclipse memory use ...