Assume a Linux binary foobar which has two different modes of operation: Mode A: A well-behaved mode in which syscalls a, b and c are used. Mode B: A things-gone-wrong mode in which syscalls a, b, c and d are used. Syscalls a, b and c are harmless, whereas syscall d is potentially dangerous and could cause instability to the
getting a program to return immediately at the command line so it’s not tied to the shell that launched it
Some programs return immediately when launched from the command line, Firefox for example. Most utilities (and all the programs I’ve written) are tied to the shell that created them. If you control-c the command line, the program’s dead. What do you have to add to a program or a shell script to get the return-immediately behavior? I guess I’m asking
yum install php-pear* on centos
I’m trying to install pear on my centos. I’ve used “*yum install php-pear**” to install pear and it seemed to install with success. No errors. I restart my server. However when I check out phpinfo(). I see that my php is still built using “–without-pear”. Isn’t yum supposed to rebuild my php with pear? What would be possibly going wrong?
Linux “install” command for wildcard installation
Is there a way to use “install” for installing multiple files at once using a “wildcard” pattern (and still have “install” create the leading directory hierarchy)? I’ve tried several different ways: install -D -t /dest/path /source/path/*.py install -D -t /dest/path/ /source/path/*.py install -D /source/path/*.py /dest/path install -D /source/path/*.py /dest/path/ Please help… for each trial it takes a lot of time
Tracking down MySQL connection leaks
I have an application server (jetty 6 on a linux box) hosting 15 individuals applications (individual war’s). Every 3 or 4 days I get an alert from nagios regarding the number of open TCP connections. Upon inspection, I see that the vast majority of these connections are to the MySQL server. Shows 10,000+ connections on the MySQL server from the
Java: Graphics in Linux
Does X-Windows have to be installed on a Linux-box in order for Java to display fullscreen graphics? Answer Other answerers appear to assume that “full screen graphics in Java” necessarily means “a working implementation of AWT”. This is, of course, not necessarily true, as it is perfectly possible (some would even say desirable) to use Java without AWT. Cairo is
Linux: How to put a load on system memory?
I’m working on a small function, that gives my users a picture of how occupied the CPU is. I’m using cat /proc/loadavg, which returns the well known 3 numbers. My problem is that the CPU doesn’t do anything, right now, while I’m developing. Is there a good way to generate some load on the CPU, I was thinking something like
Drawing on the X root window
I’d like to be able to draw on the root window in Linux. I.e. make an OSD. I’m using Gnome. Code samples or links to them would be appreciated. Answer It is possible, but you will not see anything in GNOME. Nautilus, GNOME’s file manager, opens its own window on top of root X window to display icons. Because of
What is the difference between LD_LIBRARY_PATH and -L at link time?
I’m having problems with LD_LIBRARY_PATH at link time (this question has nothing to do with run time). The link line looks like this when I run make (this is a Linux system using g++ version 4.1.x): The -l options reference shared libraries (e.g., libabc.so) which exist in the directories specified by the -L options. Those directories also appear in LD_LIBRARY_PATH.
Display socket options
How I can see from shell what socket options are set? In particular I’m interesting to know if SO_BROADCAST is set? Answer You can use lsof(8). If PID is the process ID and FD is the file descriptor number of the socket you’re interested in, you can do this: To list all IPv4 sockets of a process: This will print