system-programming

Programatically restart USB device in Windows.

Some software I am developing requires the presence of a USB device (which I interact with as a SerialPort, with a USB-to-UART bridge). Sometimes, after a computer is being restarted from hibernation, the device is not being detected, and I can no longer write to, or read from, the device through its serial port. Having read/write acces...

Determine whether a file is on NFS using system programming.

I need to determine if a file resides in NFS in my C program. I know there are several ways to do that differently on Linux, Solaris etc but I need to write a program which works on all Unix platforms like Solaris, AIX, HPUX along with Linux and Windows (if possible). I don't think i will be able to find something compatible with Window...

Changing a process name in runtime.

For A.EXE PE file, if the program runs as test mode, I would like to change the process name to "A_TEST.exe". And if the program runs as safe mode, I want to change to "A_SAFE.exe" The file name must be same(A.EXE). Is it possible? ...

Does anyone see any problem in this program

After not getting an answer I liked for this question about chroot, I went and rolled my own solution: #include <unistd.h> #include <sys/types.h> #include <pwd.h> #include <stdio.h> extern char **environ; int main(int argc, char** argv, char** envp) { char* path = "/"; char* name = "nobody"; char* exe = "/bin/false"; struct pas...

Difference between API and ABI

I am new to linux system programming and I came across API and ABI while reading Linux System Programming. Definition of API : An API defines the interfaces by which one piece of software communicates with another at the source level. Definition of ABI : Whereas an API defines a source interface, an ABI defines the low...

Zombie processes......

I'v some questions about zombie processes what the benefits from zombie process concept? know that the kernel keeps (PID,termination status, resource usage information) for zombie process what's the meaning of "resource usage information" how zombie's PPID() = 1 and it still zombie , (init reaps Zombies because it wait() by default) ...

What is the best book about osdev?

What is the best book about operating systems development and programming? What books can be more helpful for those looking to program operating systems? ...