Skip to content
Advertisement

Wait until a certain process (knowing the “pid”) end

I have this: Then i do this: I think this is not the best way to wait for the process to terminate, there must be some function wait or something, but i can’t find it. Disclaimer: The process is not a child process Answer I’m not really a Python programmer, but apparently Python does have os.waitpid(). That should consume less

Best way to implement busy loop?

What is the best way to implement the busy loop ? correct me if i am wrong ? Answer To do an infinite wait, for a signal (what else) there is the pause() system call. You’ll have to put it in a loop, as it returns (always with -1 and errno set to EINTR) every time a signal is delivered:

Check whether a path is absolute or relative

How do you check whether a path is absolute or relative, using C on Linux? Answer On Unix like systems (incl. Linux, macOS) If it starts with a slash it’s absolute, otherwise it’s relative. That is because everything is part of a single tree starting at the root (/) and file systems are mounted somewhere in this tree. On Windows

basics steps in converting xml file to html file

I would like convert a xml file to a html file. Where i can find a step by step tutorial (for linux) to do this in shell script, or which are the steps to follow. Sorry for the very basic question, but i am an absolute begginer on this. thanx Answer The basic tools to do this is XSLT. XSLT

Unknown symbol in while loading a kernel module

I need help understanding why I get an error when I insert a module. I have tried this with no success. Many thanks. Answer I have solved this problem as suggested on this forum: Compiled scst. Appended the generated Module.symvers to existent /lib/modules/<version>/build/Module.symvers (Hack. Do not know why the kernel did not see the exported symbols). Copied the scst to

Error installing NPM for node.js

I’m trying to install npm on ubuntu 11.04 using the “git all the way” method found in this gist I keep getting this error after running sudo make install on npm I know this is something wrong with bash, but I’m not very good with bash. EDIT running the node command in the terminal brings up the node shell as

Linux udev rule does not appear to work

I am writing an application that MUST run on Fedora Core 4. The application needs to access a USB device WITHOUT root privileges. Using libusb-1.0.8 I have successfully written the application except for one problem. If I do not have root privileges, libusb_open fails with -3 “Permission Denied”. I’ve read that I can alter the permissions of the device with

Advertisement