system-programming

How to programmatically really clean Delete files?

So you are about to pass your work-computer to some of your colleague. How do you make sure you really delete all your personal data? Re-formatting, Re-installing OS will not really solve the problem. I searched around and found some programs does "Wipe out" disks. This caught me thinking how does those programs work? I mean, What al...

Linux Programming Book

I'm looking for a good book on Linux system programming and wondered whether anybody could recommend an up-to-date appropriate book that covers the subject well. Things like: I/O and fileystems Thread and processes etc... Can anybody suggest an appropriate book that they've read/used, not just something that they've seen on Amazon ...

GetAsyncKeyState Vs Low Level WIndows Hook

What should be used to log keys. GetAsyncKeyState or low level windows hook. I found that GetAsyncKeyState sometimes loses key strokes and the messages sent sometimes appear out of order. Low level hooks seem to be the only way to do this. Please suggest. Thanks ...

what is work area in system programming?

i have read it when i was learning linking. When the program is going to be executed it was first linked by linker. At that time it was put in work area. Now i want to now what is this work area? ...

What happens to an open file handler on Linux if the pointed file gets moved, delete ....

Hi, What happens to an open file handler on Linux if the pointed file meanwhile gets: Moved away -> Does the file handler stays valid? Deleted -> Does this lead to an EBADF, indicating an invalid file handler? Replaced by a new file -> Does the file handler pointing to this new file? Replace by a hard link to a new file -> Does my fil...

Unable to use "execve()" successfully....

The aim of the program is to fork a new child process and execute a process which also has command line arguments.. If i enter "/bin/ls --help". I get the error... shadyabhi@shadyabhi-desktop:~/lab/200801076_lab3$ ./a.out Enter the name of the executable(with full path)/bin/ls --help Starting the executable as a new child process... B...

System-programming, books about specific fields

Currently reading : but I can't say I'm pleased. I'm interested in the following chapters in the book : Ch 7. Linking Ch 8. Exceptional Control Flow Ch 10. Virtual memory Ch 11.System-Level I/O Ch 12. Network programming Ch 13. Concurrent programming Reading the book, if feels "too easy". I can clearly understand what they want to e...

Unix system programming - unzipping a file programmatically

What I need to do is unzip a file, (.gz or .z), read the first line and do some stuff according to the first line read. But the C standard library doesn't seem to offer a way to do this. Is the a platform-independent way to do it? ...

NACHOS(JAVA verrsion) tutorials [setup and simple sample]

I need to setup NACHOS java version in Linux and run some simple sample . How to setup and run simple sample ? [need some tutorials and some computer assignment with solution with NACHOS] ...

What's the shortest code to write directly to a memory address in C/C++?

I'm writing system-level code for an embedded system without memory protection (on an ARM Cortex-M1, compiling with gcc 4.3) and need to read/write directly to a memory-mapped register. So far, my code looks like this: #define UART0 0x4000C000 #define UART0CTL (UART0 + 0x30) volatile unsigned int *p; p = UART0CTL; *p &= ~1; Is t...

Checking status after wait()

After creating a child process and exiting it immediately (_exit()), I want to perform a wait and check the status. Now I wonder if in the 'else' branch of the if/else construct I also need to check for WIFSIGNALED. As far as I understand, if I perform a wait, a) an error could have occured (-1), the child could have terminated normally ...

Directly Jump to another C++ function

I'm porting a small academic OS from TriCore to ARM Cortex (Thumb-2 instruction set). For the scheduler to work, I sometimes need to JUMP directly to another function without modifying the stack nor the link register. On TriCore (or, rather, on tricore-g++), this wrapper template (for any three-argument-function) works: template< class...

pagesize and its ratio to 4096

Hello Are there systems, where minimal page of memory (pagesize) has a size not divisible by 2, or by 1024, 4096? Can it be 3000 or 3500? Will any posix program break, if pagesize will be not divisible by 1024? ...

SysInternal's WinObj device listing mechanism

SysInternals's WinObj can list all device objects. I wonder how it can list the devices. Is there any open source we can read?(or a code snippet) What is the most significant function I should know? ...

How to get Hidden Partitions in the Harddisk in VC++?

How to get Hidden Partitions in the Harddisk in VC++? Does any one knows this. please share info.... Thanks in advance. ~Hara ...

How can we receive a volume attaching notification

When a volume is attached to file system, on Windows, the Window explorer detects the volume and refreshes automatically. I wonder the technique. How do an program(include device driver) get the notification? -Of course, it doesn’t mean a polling. I want to get an event(or a message). I would like to get the notification when a network...

How to modify Keyboard interrupt (under Windows XP) from a C++ Program ?

Hi everyone ! We have been given a little project (As part of my OS course) to make a Windows program that modifies keyboard input, so that it transforms any lowercase character entered into an uppercase one (without using caps-lock) ! so when you type on the keyboard you'll see what you're typing transformed into uppercase ! I have do...

Linux System Programming

I wanted to get into systems programming for linux and wanted to know how to approach that and where to begin. I come from a web development background (Python, PHP) but I also know some C and C++. Essentially, I would like to know: Which language(s) to learn and pursue (I think mainly C and C++)? How/Where to learn those languages sp...

What are all the disadvantages of using files as a means of communicating between two processes?

I have legacy code which I need to improve for performance reasons. My application comprises of two executables that need to exchange certain information. In the legacy code, one exe writes to a file ( the file name is passed as an argument to exe) and the second executable first checks if such a file exists; if does not exist checks ag...

How can I programmatically get the connection status of OSX network services?

In the OS X System Preferences, when I click on 'Network' I see a green dot by 'Ethernet', and red dots by 'AirPort' and 'FireWire'. This is because I turned off AirPort and FireWire, as I access networks and the Internet via Ethernet. I need to programmatically determine which of these network services displayed in System Preferences h...